pub enum AnyValue<'a> {
Show 28 variants
Null,
Boolean(bool),
String(&'a str),
UInt8(u8),
UInt16(u16),
UInt32(u32),
UInt64(u64),
UInt128(u128),
Int8(i8),
Int16(i16),
Int32(i32),
Int64(i64),
Int128(i128),
Float16(pf16),
Float32(f32),
Float64(f64),
Categorical(CatSize, &'a Arc<CategoricalMapping>),
CategoricalOwned(CatSize, Arc<CategoricalMapping>),
Enum(CatSize, &'a Arc<CategoricalMapping>),
EnumOwned(CatSize, Arc<CategoricalMapping>),
List(Series),
Array(Series, usize),
Object(&'a dyn PolarsObjectSafe),
ObjectOwned(OwnedObject),
StringOwned(PlSmallStr),
Binary(&'a [u8]),
BinaryOwned(Vec<u8>),
Decimal(i128, usize, usize),
}Variants§
Null
Boolean(bool)
A binary true or false.
String(&'a str)
A UTF8 encoded string type.
UInt8(u8)
An unsigned 8-bit integer number.
UInt16(u16)
An unsigned 16-bit integer number.
UInt32(u32)
An unsigned 32-bit integer number.
UInt64(u64)
An unsigned 64-bit integer number.
UInt128(u128)
An unsigned 128-bit integer number.
Int8(i8)
An 8-bit integer number.
Int16(i16)
A 16-bit integer number.
Int32(i32)
A 32-bit integer number.
Int64(i64)
A 64-bit integer number.
Int128(i128)
A 128-bit integer number.
Float16(pf16)
A 16-bit floating point number.
Float32(f32)
A 32-bit floating point number.
Float64(f64)
A 64-bit floating point number.
Categorical(CatSize, &'a Arc<CategoricalMapping>)
dtype-categorical only.CategoricalOwned(CatSize, Arc<CategoricalMapping>)
dtype-categorical only.Enum(CatSize, &'a Arc<CategoricalMapping>)
dtype-categorical only.EnumOwned(CatSize, Arc<CategoricalMapping>)
dtype-categorical only.List(Series)
Nested type, contains arrays that are filled with one of the datatypes.
Array(Series, usize)
dtype-array only.Object(&'a dyn PolarsObjectSafe)
object only.Can be used to fmt and implements Any, so can be downcasted to the proper value type.
ObjectOwned(OwnedObject)
object only.StringOwned(PlSmallStr)
An UTF8 encoded string type.
Binary(&'a [u8])
BinaryOwned(Vec<u8>)
Decimal(i128, usize, usize)
dtype-decimal only.A 128-bit fixed point decimal number with a precision and scale.
Implementations§
Source§impl AnyValue<'static>
impl AnyValue<'static>
Source§impl<'a> AnyValue<'a>
impl<'a> AnyValue<'a>
pub fn try_extract<T: NumCast + IsFloat>(&self) -> PolarsResult<T>
pub fn is_boolean(&self) -> bool
pub fn is_primitive_numeric(&self) -> bool
pub fn is_float(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_signed_integer(&self) -> bool
pub fn is_unsigned_integer(&self) -> bool
pub fn is_nan(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_nested_null(&self) -> bool
Sourcepub fn null_to_none(self) -> Option<Self>
pub fn null_to_none(self) -> Option<Self>
Converts AnyValue::Null to None, anything else to Some(self).
Sourcepub fn strict_cast(&self, dtype: &'a DataType) -> Option<AnyValue<'a>>
pub fn strict_cast(&self, dtype: &'a DataType) -> Option<AnyValue<'a>>
Cast AnyValue to the provided data type and return a new AnyValue with type dtype,
if possible.
Sourcepub fn try_strict_cast(&self, dtype: &'a DataType) -> PolarsResult<AnyValue<'a>>
pub fn try_strict_cast(&self, dtype: &'a DataType) -> PolarsResult<AnyValue<'a>>
Cast AnyValue to the provided data type and return a new AnyValue with type dtype,
if possible.
pub fn cast(&self, dtype: &'a DataType) -> AnyValue<'a>
pub fn idx(&self) -> IdxSize
pub fn str_value(&self) -> Cow<'a, str>
pub fn to_physical(self) -> Self
pub fn extract_bool(&self) -> Option<bool>
pub fn extract_str(&self) -> Option<&str>
pub fn extract_bytes(&self) -> Option<&[u8]>
Trait Implementations§
Source§impl From<&AnyValue<'_>> for NaiveDateTime
Available on crate features temporal or dtype-datetime or dtype-date only.
impl From<&AnyValue<'_>> for NaiveDateTime
temporal or dtype-datetime or dtype-date only.Source§impl From<&AnyValue<'_>> for NaiveTime
Available on crate features temporal or dtype-datetime or dtype-date only.
impl From<&AnyValue<'_>> for NaiveTime
temporal or dtype-datetime or dtype-date only.Source§impl<K: NumericNative> From<K> for AnyValue<'static>
impl<K: NumericNative> From<K> for AnyValue<'static>
Source§impl PartialOrd for AnyValue<'_>
impl PartialOrd for AnyValue<'_>
impl Eq for AnyValue<'_>
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> !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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more