pub struct Atom(pub usize);Expand description
A simple type to represent atoms: a wrapper around unsigned integers.
Implements Deref to usize for ease of use. In terms of being parsed,
any atom less than 26 maps to a corresponding lowercase letter and those
from 26..52 map to the corresponding uppercase letter. If for whatever
reason you need more than 52 atoms, then they can only be printed/parsed
as the corresponding numbers.
Tuple Fields§
§0: usizeTrait Implementations§
impl Copy for Atom
impl Eq for Atom
Source§impl Match for Atom
impl Match for Atom
Source§impl Ord for Atom
impl Ord for Atom
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Atom
impl PartialOrd for Atom
impl StructuralPartialEq for Atom
impl Symbolic for Atom
Auto Trait Implementations§
impl Freeze for Atom
impl RefUnwindSafe for Atom
impl Send for Atom
impl Sync for Atom
impl Unpin for Atom
impl UnsafeUnpin for Atom
impl UnwindSafe for Atom
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