pub struct Tokens(/* private fields */);Expand description
Whole tokens.
Implementations§
Source§impl Tokens
impl Tokens
pub const fn new(value: u64) -> Tokens
pub const fn get(self) -> u64
Sourcepub fn checked_add(self, other: Tokens) -> Option<Tokens>
pub fn checked_add(self, other: Tokens) -> Option<Tokens>
Overflow is None; the caller owns the verdict, which is
E_INVALID_ARGS at every site that has one. Choosing an
error story here would force it on every caller.
Trait Implementations§
impl Copy for Tokens
Source§impl<'de> Deserialize<'de> for Tokens
impl<'de> Deserialize<'de> for Tokens
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Tokens
Source§impl Ord for Tokens
impl Ord for Tokens
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 Tokens
impl PartialOrd for Tokens
impl StructuralPartialEq for Tokens
Auto Trait Implementations§
impl Freeze for Tokens
impl RefUnwindSafe for Tokens
impl Send for Tokens
impl Sync for Tokens
impl Unpin for Tokens
impl UnsafeUnpin for Tokens
impl UnwindSafe for Tokens
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