pub struct Scalar { /* private fields */ }
Implementations§
Source§impl Scalar
impl Scalar
pub fn new(dtype: DataType, value: AnyValue<'static>) -> Scalar
pub fn is_null(&self) -> bool
pub fn is_nan(&self) -> bool
pub fn value(&self) -> &AnyValue<'static>
pub fn as_any_value(&self) -> AnyValue<'_>
pub fn into_series(self, name: PlSmallStr) -> Series
Sourcepub fn into_column(self, name: PlSmallStr) -> Column
pub fn into_column(self, name: PlSmallStr) -> Column
Turn a scalar into a column with length=1
.
pub fn dtype(&self) -> &DataType
pub fn update(&mut self, value: AnyValue<'static>)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scalar
impl<'de> Deserialize<'de> for Scalar
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Scalar, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Scalar, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<PlSmallStr> for Scalar
impl From<PlSmallStr> for Scalar
Source§fn from(v: PlSmallStr) -> Scalar
fn from(v: PlSmallStr) -> Scalar
Converts to this type from the input type.
Source§impl Serialize for Scalar
impl Serialize for Scalar
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl Freeze for Scalar
impl !RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl !UnwindSafe for Scalar
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
Converts
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> ⓘ
Converts
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 more