pub trait LiteralExt {
// Required methods
fn type_name(&self) -> &'static str;
fn to_string_owned(&self) -> Result<String, LiteralCastError>;
fn to_native<T>(&self) -> Result<T, LiteralCastError>
where T: FromLiteral + Copy + 'static;
fn from_array_ref(
array: &Arc<dyn Array>,
index: usize,
) -> Result<Literal, Error>;
fn bound_to_native<T>(
bound: &Bound<Literal>,
) -> Result<Bound<<T as ArrowPrimitiveType>::Native>, LiteralCastError>
where T: ArrowPrimitiveType,
<T as ArrowPrimitiveType>::Native: FromLiteral + Copy;
}Expand description
Extension methods for working with Literal.
Required Methods§
fn type_name(&self) -> &'static str
fn to_string_owned(&self) -> Result<String, LiteralCastError>
fn to_native<T>(&self) -> Result<T, LiteralCastError>where
T: FromLiteral + Copy + 'static,
fn from_array_ref( array: &Arc<dyn Array>, index: usize, ) -> Result<Literal, Error>
fn bound_to_native<T>( bound: &Bound<Literal>, ) -> Result<Bound<<T as ArrowPrimitiveType>::Native>, LiteralCastError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.