pub enum SubDenomination {
    Wei(wei),
    Gwei(gwei),
    Ether(ether),
    Seconds(seconds),
    Minutes(minutes),
    Hours(hours),
    Days(days),
    Weeks(weeks),
    Years(years),
}Expand description
A sub-denomination suffix for a number literal.
Variants§
Wei(wei)
wei
Gwei(gwei)
gwei
Ether(ether)
ether
Seconds(seconds)
seconds
Minutes(minutes)
minutes
Hours(hours)
hours
Days(days)
days
Weeks(weeks)
weeks
Years(years)
years
Implementations§
Source§impl SubDenomination
 
impl SubDenomination
Sourcepub fn new_seconds(span: Span) -> Self
 
pub fn new_seconds(span: Span) -> Self
Creates a new Seconds keyword with the given span.
Sourcepub fn new_minutes(span: Span) -> Self
 
pub fn new_minutes(span: Span) -> Self
Creates a new Minutes keyword with the given span.
pub fn parse_opt(input: ParseStream<'_>) -> Result<Option<Self>>
pub fn peek(lookahead: &Lookahead1<'_>) -> bool
pub const fn as_str(self) -> &'static str
pub const fn as_debug_str(self) -> &'static str
Sourcepub const fn is_seconds(self) -> bool
 
pub const fn is_seconds(self) -> bool
Returns true if self matches Self::Seconds.
Sourcepub const fn is_minutes(self) -> bool
 
pub const fn is_minutes(self) -> bool
Returns true if self matches Self::Minutes.
Trait Implementations§
Source§impl Clone for SubDenomination
 
impl Clone for SubDenomination
Source§fn clone(&self) -> SubDenomination
 
fn clone(&self) -> SubDenomination
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 SubDenomination
 
impl Debug for SubDenomination
Source§impl Display for SubDenomination
 
impl Display for SubDenomination
Source§impl Hash for SubDenomination
 
impl Hash for SubDenomination
Source§impl Parse for SubDenomination
 
impl Parse for SubDenomination
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for SubDenomination
 
impl PartialEq for SubDenomination
Source§impl Spanned for SubDenomination
 
impl Spanned for SubDenomination
Source§fn span(&self) -> Span
 
fn span(&self) -> Span
Returns a 
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.impl Copy for SubDenomination
impl Eq for SubDenomination
Auto Trait Implementations§
impl Freeze for SubDenomination
impl RefUnwindSafe for SubDenomination
impl !Send for SubDenomination
impl !Sync for SubDenomination
impl Unpin for SubDenomination
impl UnwindSafe for SubDenomination
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
- Wei: 12 bytes
- Gwei: 12 bytes
- Ether: 12 bytes
- Seconds: 12 bytes
- Minutes: 12 bytes
- Hours: 12 bytes
- Days: 12 bytes
- Weeks: 12 bytes
- Years: 12 bytes