Struct currencies::ParsedAmount
source · pub struct ParsedAmount<C: Currency = USD, Safety: Safety = Unchecked> {
pub amount: Amount<C, Safety>,
pub span: Span,
}
Expand description
Fields§
§amount: Amount<C, Safety>
The parsed Amount
.
span: Span
Trait Implementations§
source§impl<C: Clone + Currency, Safety: Clone + Safety> Clone for ParsedAmount<C, Safety>
impl<C: Clone + Currency, Safety: Clone + Safety> Clone for ParsedAmount<C, Safety>
source§fn clone(&self) -> ParsedAmount<C, Safety>
fn clone(&self) -> ParsedAmount<C, Safety>
Returns a copy 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<C: Currency, Safety: Safety> Parsable for ParsedAmount<C, Safety>
impl<C: Currency, Safety: Safety> Parsable for ParsedAmount<C, Safety>
source§fn parse(stream: &mut ParseStream) -> Result<Self>
fn parse(stream: &mut ParseStream) -> Result<Self>
Attempts to parse the specified string into a value of type
T
.source§fn parse_value(value: Self, stream: &mut ParseStream) -> Result<Self, Error>
fn parse_value(value: Self, stream: &mut ParseStream) -> Result<Self, Error>
Attempts to parse a specific value of type
T
from the ParseStream
.source§impl<C: PartialEq + Currency, Safety: PartialEq + Safety> PartialEq for ParsedAmount<C, Safety>
impl<C: PartialEq + Currency, Safety: PartialEq + Safety> PartialEq for ParsedAmount<C, Safety>
source§fn eq(&self, other: &ParsedAmount<C, Safety>) -> bool
fn eq(&self, other: &ParsedAmount<C, Safety>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<C: Eq + Currency, Safety: Eq + Safety> Eq for ParsedAmount<C, Safety>
impl<C: Currency, Safety: Safety> StructuralPartialEq for ParsedAmount<C, Safety>
Auto Trait Implementations§
impl<C, Safety> Freeze for ParsedAmount<C, Safety>
impl<C, Safety> RefUnwindSafe for ParsedAmount<C, Safety>where
Safety: Safety + Hash + Debug + Ord + PartialOrd + Eq + PartialEq + Clone + Copy + RefUnwindSafe,
C: Hash + Ord + PartialOrd + Eq + PartialEq + Clone + Copy + RefUnwindSafe,
<C as Currency>::Backing: RefUnwindSafe,
impl<C = USD, Safety = Unchecked> !Send for ParsedAmount<C, Safety>
impl<C = USD, Safety = Unchecked> !Sync for ParsedAmount<C, Safety>
impl<C, Safety> Unpin for ParsedAmount<C, Safety>
impl<C, Safety> UnwindSafe for ParsedAmount<C, Safety>where
Safety: Safety + Hash + Debug + Ord + PartialOrd + Eq + PartialEq + Clone + Copy + UnwindSafe,
C: Hash + Ord + PartialOrd + Eq + PartialEq + Clone + Copy + UnwindSafe,
<C as Currency>::Backing: UnwindSafe,
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> Peekable for Twhere
T: Parsable,
impl<T> Peekable for Twhere
T: Parsable,
source§fn peek(stream: &ParseStream) -> bool
fn peek(stream: &ParseStream) -> bool
Returns a boolean indicating whether the
ParseStream
can parse the specified type
at the current parsing position.source§fn peek_value(value: T, stream: &ParseStream) -> bool
fn peek_value(value: T, stream: &ParseStream) -> bool
Returns a boolean indicating whether the
ParseStream
can parse the specified value
at the current parsing position.