pub enum AnyValue<'a> {
Show 21 variants
Null,
Bool(bool),
UInt8(u8),
UInt16(u16),
UInt32(u32),
UInt64(u64),
UInt128(u128),
Int8(i8),
Int16(i16),
Int32(i32),
Int64(i64),
Int128(i128),
Float32(f32),
Float64(f64),
Duration(Duration),
Char(char),
Str(&'a str),
StrOwned(String),
Slice(&'a [AnyValue<'a>]),
Vector(Vec<AnyValue<'a>>),
Struct(Vec<(Field, AnyValue<'a>)>),
}Variants§
Null
Bool(bool)
UInt8(u8)
UInt16(u16)
UInt32(u32)
UInt64(u64)
UInt128(u128)
Int8(i8)
Int16(i16)
Int32(i32)
Int64(i64)
Int128(i128)
Float32(f32)
Float64(f64)
Duration(Duration)
Char(char)
Str(&'a str)
StrOwned(String)
Slice(&'a [AnyValue<'a>])
Vector(Vec<AnyValue<'a>>)
Struct(Vec<(Field, AnyValue<'a>)>)
Implementations§
Source§impl<'a> AnyValue<'a>
impl<'a> AnyValue<'a>
pub fn is_null(&self) -> bool
pub fn is_boolean(&self) -> bool
pub fn is_float(&self) -> bool
pub fn is_int(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_nested(&self) -> bool
pub fn len(&self) -> Option<usize>
pub fn is_numeric(&self) -> bool
pub fn type_name(&self) -> &'static str
pub fn dtype(&self) -> DataType
pub fn cast(self, to: &DataType) -> Option<AnyValue<'a>>
Sourcepub fn into_static(self) -> AnyValue<'static>
pub fn into_static(self) -> AnyValue<'static>
Try to coerce to an AnyValue with static lifetime. This can be done if it does not borrow any values.
pub fn extract<T: NumCast>(&self) -> Option<T>
pub fn into_string(self) -> Option<String>
pub fn as_str(&self) -> Option<&str>
Trait Implementations§
Source§impl<'a> ExprProjection for AnyValue<'a>
impl<'a> ExprProjection for AnyValue<'a>
Source§impl<'a> Ord for AnyValue<'a>
impl<'a> Ord for AnyValue<'a>
Source§impl<'a> PartialOrd for AnyValue<'a>
impl<'a> PartialOrd for AnyValue<'a>
impl<'a> Eq for AnyValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for AnyValue<'a>
impl<'a> RefUnwindSafe for AnyValue<'a>
impl<'a> Send for AnyValue<'a>
impl<'a> Sync for AnyValue<'a>
impl<'a> Unpin for AnyValue<'a>
impl<'a> UnsafeUnpin for AnyValue<'a>
impl<'a> UnwindSafe for AnyValue<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.