pub enum Decimal {
Int32 {
value: [u8; 4],
precision: i32,
scale: i32,
},
Int64 {
value: [u8; 8],
precision: i32,
scale: i32,
},
Bytes {
value: ByteArray,
precision: i32,
scale: i32,
},
}
Expand description
Rust representation for Decimal values.
This is not a representation of Parquet physical type, but rather a wrapper for DECIMAL logical type, and serves as container for raw parts of decimal values: unscaled value in bytes, precision and scale.
Variants§
Implementations§
source§impl Decimal
impl Decimal
sourcepub fn from_i32(value: i32, precision: i32, scale: i32) -> Self
pub fn from_i32(value: i32, precision: i32, scale: i32) -> Self
Creates new decimal value from i32
.
sourcepub fn from_i64(value: i64, precision: i32, scale: i32) -> Self
pub fn from_i64(value: i64, precision: i32, scale: i32) -> Self
Creates new decimal value from i64
.
sourcepub fn from_bytes(value: ByteArray, precision: i32, scale: i32) -> Self
pub fn from_bytes(value: ByteArray, precision: i32, scale: i32) -> Self
Creates new decimal value from ByteArray
.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Decimal
impl RefUnwindSafe for Decimal
impl Send for Decimal
impl Sync for Decimal
impl Unpin for Decimal
impl UnwindSafe for Decimal
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)