pub struct FixedPoint128 {
pub value: i128,
}Expand description
Fixed-point representation for exact decimal arithmetic. Uses 128 bits with 18 decimal places (1e18 scale factor). Supports values up to ~170 trillion with 18 decimal precision.
Fields§
§value: i128Internal value scaled by 1e18.
Implementations§
Trait Implementations§
Source§impl Add for FixedPoint128
impl Add for FixedPoint128
Source§impl AddAssign for FixedPoint128
impl AddAssign for FixedPoint128
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for FixedPoint128
impl Clone for FixedPoint128
Source§fn clone(&self) -> FixedPoint128
fn clone(&self) -> FixedPoint128
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 Debug for FixedPoint128
impl Debug for FixedPoint128
Source§impl Default for FixedPoint128
impl Default for FixedPoint128
Source§impl<'de> Deserialize<'de> for FixedPoint128
impl<'de> Deserialize<'de> for FixedPoint128
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 Hash for FixedPoint128
impl Hash for FixedPoint128
Source§impl Neg for FixedPoint128
impl Neg for FixedPoint128
Source§impl Ord for FixedPoint128
impl Ord for FixedPoint128
Source§impl PartialEq for FixedPoint128
impl PartialEq for FixedPoint128
Source§impl PartialOrd for FixedPoint128
impl PartialOrd for FixedPoint128
Source§impl Serialize for FixedPoint128
impl Serialize for FixedPoint128
Source§impl Sub for FixedPoint128
impl Sub for FixedPoint128
Source§impl SubAssign for FixedPoint128
impl SubAssign for FixedPoint128
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for FixedPoint128
impl Eq for FixedPoint128
impl StructuralPartialEq for FixedPoint128
Auto Trait Implementations§
impl Freeze for FixedPoint128
impl RefUnwindSafe for FixedPoint128
impl Send for FixedPoint128
impl Sync for FixedPoint128
impl Unpin for FixedPoint128
impl UnwindSafe for FixedPoint128
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CallHasher for T
impl<T> CallHasher for T
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.