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_wei(span: Span) -> SubDenomination
pub fn new_wei(span: Span) -> SubDenomination
Creates a new Wei
keyword with the given span
.
Sourcepub fn new_gwei(span: Span) -> SubDenomination
pub fn new_gwei(span: Span) -> SubDenomination
Creates a new Gwei
keyword with the given span
.
Sourcepub fn new_ether(span: Span) -> SubDenomination
pub fn new_ether(span: Span) -> SubDenomination
Creates a new Ether
keyword with the given span
.
Sourcepub fn new_seconds(span: Span) -> SubDenomination
pub fn new_seconds(span: Span) -> SubDenomination
Creates a new Seconds
keyword with the given span
.
Sourcepub fn new_minutes(span: Span) -> SubDenomination
pub fn new_minutes(span: Span) -> SubDenomination
Creates a new Minutes
keyword with the given span
.
Sourcepub fn new_hours(span: Span) -> SubDenomination
pub fn new_hours(span: Span) -> SubDenomination
Creates a new Hours
keyword with the given span
.
Sourcepub fn new_days(span: Span) -> SubDenomination
pub fn new_days(span: Span) -> SubDenomination
Creates a new Days
keyword with the given span
.
Sourcepub fn new_weeks(span: Span) -> SubDenomination
pub fn new_weeks(span: Span) -> SubDenomination
Creates a new Weeks
keyword with the given span
.
Sourcepub fn new_years(span: Span) -> SubDenomination
pub fn new_years(span: Span) -> SubDenomination
Creates a new Years
keyword with the given span
.
pub fn parse_opt( input: &ParseBuffer<'_>, ) -> Result<Option<SubDenomination>, Error>
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: &ParseBuffer<'_>) -> Result<SubDenomination, Error>
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