Struct VariantDecimal16
pub struct VariantDecimal16 {
integer: i128,
scale: u8,
}
Expand description
Represents an 16-byte decimal value in the Variant format.
This struct stores a decimal number using a 128-bit signed integer for the coefficient and an 8-bit unsigned integer for the scale (number of decimal places). Its precision is between 19 and 38 digits.
For valid precision and scale values, see the Variant specification:
§Example: Create a VariantDecimal16
// Create a value representing the decimal 12345678901234567.890
let decimal = VariantDecimal16::try_new(12345678901234567890, 3).unwrap();
Fields§
§integer: i128
§scale: u8
Implementations§
§impl VariantDecimal16
impl VariantDecimal16
Trait Implementations§
§impl Clone for VariantDecimal16
impl Clone for VariantDecimal16
§fn clone(&self) -> VariantDecimal16
fn clone(&self) -> VariantDecimal16
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 more§impl Debug for VariantDecimal16
impl Debug for VariantDecimal16
§impl Display for VariantDecimal16
impl Display for VariantDecimal16
§impl From<VariantDecimal16> for Variant<'_, '_>
impl From<VariantDecimal16> for Variant<'_, '_>
§fn from(value: VariantDecimal16) -> Variant<'_, '_>
fn from(value: VariantDecimal16) -> Variant<'_, '_>
Converts to this type from the input type.
§impl From<VariantDecimal4> for VariantDecimal16
impl From<VariantDecimal4> for VariantDecimal16
§fn from(decimal: VariantDecimal4) -> VariantDecimal16
fn from(decimal: VariantDecimal4) -> VariantDecimal16
Converts to this type from the input type.
§impl From<VariantDecimal8> for VariantDecimal16
impl From<VariantDecimal8> for VariantDecimal16
§fn from(decimal: VariantDecimal8) -> VariantDecimal16
fn from(decimal: VariantDecimal8) -> VariantDecimal16
Converts to this type from the input type.
§impl PartialEq for VariantDecimal16
impl PartialEq for VariantDecimal16
§impl TryFrom<VariantDecimal16> for VariantDecimal4
impl TryFrom<VariantDecimal16> for VariantDecimal4
§fn try_from(decimal: VariantDecimal16) -> Result<VariantDecimal4, ArrowError>
fn try_from(decimal: VariantDecimal16) -> Result<VariantDecimal4, ArrowError>
Performs the conversion.
§impl TryFrom<VariantDecimal16> for VariantDecimal8
impl TryFrom<VariantDecimal16> for VariantDecimal8
§fn try_from(decimal: VariantDecimal16) -> Result<VariantDecimal8, ArrowError>
fn try_from(decimal: VariantDecimal16) -> Result<VariantDecimal8, ArrowError>
Performs the conversion.
§impl TryFrom<i128> for VariantDecimal16
impl TryFrom<i128> for VariantDecimal16
impl Copy for VariantDecimal16
impl StructuralPartialEq for VariantDecimal16
Auto Trait Implementations§
impl Freeze for VariantDecimal16
impl RefUnwindSafe for VariantDecimal16
impl Send for VariantDecimal16
impl Sync for VariantDecimal16
impl Unpin for VariantDecimal16
impl UnwindSafe for VariantDecimal16
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<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