pub struct UnsignedDecimal(Decimal);Tuple Fields§
§0: DecimalImplementations§
Source§impl UnsignedDecimal
impl UnsignedDecimal
Sourcepub fn new(value: Decimal) -> Result<Self, O2Error>
pub fn new(value: Decimal) -> Result<Self, O2Error>
Create a new UnsignedDecimal, returning an error if the value is negative.
Sourcepub fn try_sub(&self, other: Self) -> Result<Self, O2Error>
pub fn try_sub(&self, other: Self) -> Result<Self, O2Error>
Fallible subtraction — returns an error if the result would be negative.
Sourcepub fn into_inner(self) -> Decimal
pub fn into_inner(self) -> Decimal
Consume and return the inner Decimal.
Trait Implementations§
Source§impl Add for UnsignedDecimal
impl Add for UnsignedDecimal
Source§impl Clone for UnsignedDecimal
impl Clone for UnsignedDecimal
Source§fn clone(&self) -> UnsignedDecimal
fn clone(&self) -> UnsignedDecimal
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 UnsignedDecimal
impl Debug for UnsignedDecimal
Source§impl<'de> Deserialize<'de> for UnsignedDecimal
impl<'de> Deserialize<'de> for UnsignedDecimal
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UnsignedDecimal
impl Display for UnsignedDecimal
Source§impl Div for UnsignedDecimal
impl Div for UnsignedDecimal
Source§impl From<u32> for UnsignedDecimal
impl From<u32> for UnsignedDecimal
Source§impl From<u64> for UnsignedDecimal
impl From<u64> for UnsignedDecimal
Source§impl FromStr for UnsignedDecimal
impl FromStr for UnsignedDecimal
Source§impl Hash for UnsignedDecimal
impl Hash for UnsignedDecimal
Source§impl Mul for UnsignedDecimal
impl Mul for UnsignedDecimal
Source§impl Ord for UnsignedDecimal
impl Ord for UnsignedDecimal
Source§fn cmp(&self, other: &UnsignedDecimal) -> Ordering
fn cmp(&self, other: &UnsignedDecimal) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UnsignedDecimal
impl PartialEq for UnsignedDecimal
Source§impl PartialOrd for UnsignedDecimal
impl PartialOrd for UnsignedDecimal
Source§impl Serialize for UnsignedDecimal
impl Serialize for UnsignedDecimal
Source§impl TryFrom<UnsignedDecimal> for OrderPriceInput
impl TryFrom<UnsignedDecimal> for OrderPriceInput
Source§impl TryFrom<UnsignedDecimal> for OrderQuantityInput
impl TryFrom<UnsignedDecimal> for OrderQuantityInput
impl Copy for UnsignedDecimal
impl Eq for UnsignedDecimal
impl StructuralPartialEq for UnsignedDecimal
Auto Trait Implementations§
impl Freeze for UnsignedDecimal
impl RefUnwindSafe for UnsignedDecimal
impl Send for UnsignedDecimal
impl Sync for UnsignedDecimal
impl Unpin for UnsignedDecimal
impl UnwindSafe for UnsignedDecimal
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.