pub fn cast_error<T>(
    val: impl Debug,
    cause: impl Into<Box<dyn Error + Sync + Send>>
) -> CastError