pub struct Decimal {
pub precision: i32,
pub scale: i32,
pub bit_width: i32,
}Expand description
Exact decimal value represented as an integer value in two’s complement. Currently 32-bit (4-byte), 64-bit (8-byte), 128-bit (16-byte) and 256-bit (32-byte) integers are used. The representation uses the endianness indicated in the Schema.
Generated from these locations:
- Table
Decimalin the fileSchema.fbs:229
Fields§
§precision: i32Total number of decimal digits
scale: i32Number of digits after the decimal point “.”
bit_width: i32Number of bits per value. The accepted widths are 32, 64, 128 and 256. We use bitWidth for consistency with Int::bitWidth.
Implementations§
Source§impl Decimal
impl Decimal
Sourcepub fn builder() -> DecimalBuilder<()>
pub fn builder() -> DecimalBuilder<()>
Creates a DecimalBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_precision: impl WriteAsDefault<i32, i32>, field_scale: impl WriteAsDefault<i32, i32>, field_bit_width: impl WriteAsDefault<i32, i32>, ) -> Offset<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Decimal
impl<'de> Deserialize<'de> for Decimal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Decimal
impl Ord for Decimal
Source§impl PartialOrd for Decimal
impl PartialOrd for Decimal
Source§impl<'a> TryFrom<DecimalRef<'a>> for Decimal
impl<'a> TryFrom<DecimalRef<'a>> for Decimal
impl Eq for Decimal
impl StructuralPartialEq for Decimal
impl VectorWrite<Offset<Decimal>> for Decimal
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<Decimal>> for Decimal
impl WriteAsOffset<Decimal> for Decimal
impl<T0: WriteAsDefault<i32, i32>, T1: WriteAsDefault<i32, i32>, T2: WriteAsDefault<i32, i32>> WriteAsOffset<Decimal> for DecimalBuilder<(T0, T1, T2)>
impl WriteAsOptional<Offset<Decimal>> for Decimal
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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