Struct switchboard_aggregator::decimal::SwitchboardDecimal
source · [−]Fields
mantissa: i128
scale: u32
Implementations
sourceimpl SwitchboardDecimal
impl SwitchboardDecimal
pub fn new(mantissa: i128, scale: u32) -> SwitchboardDecimal
pub fn from_rust_decimal(d: Decimal) -> SwitchboardDecimal
pub fn from_f64(v: f64) -> SwitchboardDecimal
Trait Implementations
sourceimpl Clone for SwitchboardDecimal
impl Clone for SwitchboardDecimal
sourcefn clone(&self) -> SwitchboardDecimal
fn clone(&self) -> SwitchboardDecimal
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SwitchboardDecimal
impl Debug for SwitchboardDecimal
sourceimpl Default for SwitchboardDecimal
impl Default for SwitchboardDecimal
sourcefn default() -> SwitchboardDecimal
fn default() -> SwitchboardDecimal
Returns the “default value” for a type. Read more
sourceimpl From<SwitchboardDecimal> for bool
impl From<SwitchboardDecimal> for bool
sourcefn from(s: SwitchboardDecimal) -> Self
fn from(s: SwitchboardDecimal) -> Self
Performs the conversion.
sourceimpl Ord for SwitchboardDecimal
impl Ord for SwitchboardDecimal
sourceimpl PartialEq<SwitchboardDecimal> for SwitchboardDecimal
impl PartialEq<SwitchboardDecimal> for SwitchboardDecimal
sourcefn eq(&self, other: &SwitchboardDecimal) -> bool
fn eq(&self, other: &SwitchboardDecimal) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SwitchboardDecimal) -> bool
fn ne(&self, other: &SwitchboardDecimal) -> bool
This method tests for !=
.
sourceimpl PartialOrd<SwitchboardDecimal> for SwitchboardDecimal
impl PartialOrd<SwitchboardDecimal> for SwitchboardDecimal
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn lt(&self, other: &Self) -> bool
fn lt(&self, other: &Self) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn le(&self, other: &Self) -> bool
fn le(&self, other: &Self) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl TryInto<Decimal> for &SwitchboardDecimal
impl TryInto<Decimal> for &SwitchboardDecimal
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_into(self) -> Result<Decimal, ProgramError>
fn try_into(self) -> Result<Decimal, ProgramError>
Performs the conversion.
sourceimpl TryInto<Decimal> for SwitchboardDecimal
impl TryInto<Decimal> for SwitchboardDecimal
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_into(self) -> Result<Decimal, ProgramError>
fn try_into(self) -> Result<Decimal, ProgramError>
Performs the conversion.
sourceimpl TryInto<f64> for SwitchboardDecimal
impl TryInto<f64> for SwitchboardDecimal
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_into(self) -> Result<f64, ProgramError>
fn try_into(self) -> Result<f64, ProgramError>
Performs the conversion.
sourceimpl TryInto<i64> for SwitchboardDecimal
impl TryInto<i64> for SwitchboardDecimal
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_into(self) -> Result<i64, ProgramError>
fn try_into(self) -> Result<i64, ProgramError>
Performs the conversion.
sourceimpl TryInto<u64> for SwitchboardDecimal
impl TryInto<u64> for SwitchboardDecimal
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_into(self) -> Result<u64, ProgramError>
fn try_into(self) -> Result<u64, ProgramError>
Performs the conversion.
impl Copy for SwitchboardDecimal
impl Eq for SwitchboardDecimal
impl StructuralEq for SwitchboardDecimal
impl StructuralPartialEq for SwitchboardDecimal
Auto Trait Implementations
impl RefUnwindSafe for SwitchboardDecimal
impl Send for SwitchboardDecimal
impl Sync for SwitchboardDecimal
impl Unpin for SwitchboardDecimal
impl UnwindSafe for SwitchboardDecimal
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more