pub enum Atom<'a> {
Integral(ANum<'a>),
Decimal(ADecimal<'a>),
Bytes(ABytes<'a>),
String(AStr<'a>),
Ident(&'a str),
}
Expand description
Atom literal (Number, Bytes, String, or Ident)
Variants§
Integral(ANum<'a>)
Integral number literal
Decimal(ADecimal<'a>)
Decimal number literal (e.g. 12.34
)
Bytes(ABytes<'a>)
Bytes literal
String(AStr<'a>)
String literal
Ident(&'a str)
Ident
Implementations§
Source§impl<'a> Atom<'a>
impl<'a> Atom<'a>
Sourcepub fn number(&self) -> Option<&ANum<'a>>
pub fn number(&self) -> Option<&ANum<'a>>
Get the Number in an Atom if the right variant, or None
Sourcepub fn decimal(&self) -> Option<&ADecimal<'a>>
pub fn decimal(&self) -> Option<&ADecimal<'a>>
Get the Decimal in an Atom if the right variant, or None
Sourcepub fn bytes(&self) -> Option<&ABytes<'a>>
pub fn bytes(&self) -> Option<&ABytes<'a>>
Get the Bytes in an Atom if the right variant, or None
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Atom<'a>
impl<'a> RefUnwindSafe for Atom<'a>
impl<'a> Send for Atom<'a>
impl<'a> Sync for Atom<'a>
impl<'a> Unpin for Atom<'a>
impl<'a> UnwindSafe for Atom<'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