pub struct DecimalScalar<'a> { /* private fields */ }Expand description
A scalar value representing a decimal number with fixed precision and scale.
Implementations§
Source§impl<'a> DecimalScalar<'a>
impl<'a> DecimalScalar<'a>
Sourcepub fn try_new(dtype: &'a DType, value: &ScalarValue) -> VortexResult<Self>
pub fn try_new(dtype: &'a DType, value: &ScalarValue) -> VortexResult<Self>
Creates a new decimal scalar from a data type and scalar value.
§Errors
Returns an error if the data type is not a decimal type.
Sourcepub fn decimal_value(&self) -> &Option<DecimalValue>
pub fn decimal_value(&self) -> &Option<DecimalValue>
Returns the decimal value, or None if null.
Trait Implementations§
Source§impl<'a> Clone for DecimalScalar<'a>
impl<'a> Clone for DecimalScalar<'a>
Source§fn clone(&self) -> DecimalScalar<'a>
fn clone(&self) -> DecimalScalar<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for DecimalScalar<'a>
impl<'a> Debug for DecimalScalar<'a>
Source§impl Display for DecimalScalar<'_>
impl Display for DecimalScalar<'_>
Source§impl From<DecimalScalar<'_>> for Scalar
impl From<DecimalScalar<'_>> for Scalar
Source§fn from(decimal_scalar: DecimalScalar<'_>) -> Self
fn from(decimal_scalar: DecimalScalar<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for DecimalScalar<'a>
impl<'a> Hash for DecimalScalar<'a>
Source§impl PartialEq for DecimalScalar<'_>
impl PartialEq for DecimalScalar<'_>
Source§impl PartialOrd for DecimalScalar<'_>
Ord is not implemented since it’s undefined for different PTypes
impl PartialOrd for DecimalScalar<'_>
Ord is not implemented since it’s undefined for different PTypes
Source§impl<'a> TryFrom<&'a Scalar> for DecimalScalar<'a>
impl<'a> TryFrom<&'a Scalar> for DecimalScalar<'a>
Source§impl TryFrom<DecimalScalar<'_>> for Option<i128>
impl TryFrom<DecimalScalar<'_>> for Option<i128>
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for Option<i16>
impl TryFrom<DecimalScalar<'_>> for Option<i16>
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for Option<i256>
impl TryFrom<DecimalScalar<'_>> for Option<i256>
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for Option<i32>
impl TryFrom<DecimalScalar<'_>> for Option<i32>
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for Option<i64>
impl TryFrom<DecimalScalar<'_>> for Option<i64>
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for Option<i8>
impl TryFrom<DecimalScalar<'_>> for Option<i8>
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for i128
impl TryFrom<DecimalScalar<'_>> for i128
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for i16
impl TryFrom<DecimalScalar<'_>> for i16
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for i256
impl TryFrom<DecimalScalar<'_>> for i256
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for i32
impl TryFrom<DecimalScalar<'_>> for i32
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for i64
impl TryFrom<DecimalScalar<'_>> for i64
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§impl TryFrom<DecimalScalar<'_>> for i8
impl TryFrom<DecimalScalar<'_>> for i8
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
impl<'a> Copy for DecimalScalar<'a>
impl Eq for DecimalScalar<'_>
Auto Trait Implementations§
impl<'a> Freeze for DecimalScalar<'a>
impl<'a> RefUnwindSafe for DecimalScalar<'a>
impl<'a> Send for DecimalScalar<'a>
impl<'a> Sync for DecimalScalar<'a>
impl<'a> Unpin for DecimalScalar<'a>
impl<'a> UnwindSafe for DecimalScalar<'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> 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.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