pub enum CurrencyAmount {
Variant0(String),
Variant1(f64),
}
Expand description
A numeric monetary amount as a string or number.
JSON schema
{
"description": "A numeric monetary amount as a string or number.",
"oneOf": [
{
"examples": [
"12.99"
],
"type": "string"
},
{
"examples": [
42
],
"type": "number"
}
],
"x-schema-name": "CurrencyAmount"
}
Variants§
Trait Implementations§
Source§impl Clone for CurrencyAmount
impl Clone for CurrencyAmount
Source§fn clone(&self) -> CurrencyAmount
fn clone(&self) -> CurrencyAmount
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 CurrencyAmount
impl Debug for CurrencyAmount
Source§impl<'de> Deserialize<'de> for CurrencyAmount
impl<'de> Deserialize<'de> for CurrencyAmount
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 Display for CurrencyAmount
impl Display for CurrencyAmount
Source§impl From<&CurrencyAmount> for CurrencyAmount
impl From<&CurrencyAmount> for CurrencyAmount
Source§fn from(value: &CurrencyAmount) -> Self
fn from(value: &CurrencyAmount) -> Self
Converts to this type from the input type.
Source§impl From<f64> for CurrencyAmount
impl From<f64> for CurrencyAmount
Source§impl FromStr for CurrencyAmount
impl FromStr for CurrencyAmount
Source§impl Serialize for CurrencyAmount
impl Serialize for CurrencyAmount
Source§impl TryFrom<&String> for CurrencyAmount
impl TryFrom<&String> for CurrencyAmount
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for CurrencyAmount
impl TryFrom<&str> for CurrencyAmount
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for CurrencyAmount
impl TryFrom<String> for CurrencyAmount
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for CurrencyAmount
impl RefUnwindSafe for CurrencyAmount
impl Send for CurrencyAmount
impl Sync for CurrencyAmount
impl Unpin for CurrencyAmount
impl UnwindSafe for CurrencyAmount
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<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.