pub enum Amount<'a> {
IssuedCurrencyAmount(IssuedCurrencyAmount<'a>),
XRPAmount(XRPAmount<'a>),
}
Variants§
IssuedCurrencyAmount(IssuedCurrencyAmount<'a>)
XRPAmount(XRPAmount<'a>)
Implementations§
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Amount<'a>
impl<'de, 'a> Deserialize<'de> for Amount<'a>
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<'a> From<BigDecimal> for Amount<'a>
impl<'a> From<BigDecimal> for Amount<'a>
Source§fn from(value: BigDecimal) -> Self
fn from(value: BigDecimal) -> Self
Converts to this type from the input type.
Source§impl<'a> From<IssuedCurrencyAmount<'a>> for Amount<'a>
impl<'a> From<IssuedCurrencyAmount<'a>> for Amount<'a>
Source§fn from(value: IssuedCurrencyAmount<'a>) -> Self
fn from(value: IssuedCurrencyAmount<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> Model for Amount<'a>
impl<'a> Model for Amount<'a>
Source§fn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Collects a models errors and returns the first error that occurs.
Source§fn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
Simply forwards the error from
get_errors
if there was one.Source§impl<'a> TryInto<BigDecimal> for Amount<'a>
impl<'a> TryInto<BigDecimal> for Amount<'a>
Source§type Error = XRPLModelException
type Error = XRPLModelException
The type returned in the event of a conversion error.
Source§fn try_into(self) -> XRPLModelResult<BigDecimal, Self::Error>
fn try_into(self) -> XRPLModelResult<BigDecimal, Self::Error>
Performs the conversion.
impl<'a> Eq for Amount<'a>
impl<'a> StructuralPartialEq for Amount<'a>
Auto Trait Implementations§
impl<'a> Freeze for Amount<'a>
impl<'a> RefUnwindSafe for Amount<'a>
impl<'a> Send for Amount<'a>
impl<'a> Sync for Amount<'a>
impl<'a> Unpin for Amount<'a>
impl<'a> UnwindSafe for Amount<'a>
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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.