pub struct Tokens(pub u32);Expand description
Wrapper for displaying a token count in human-readable form via fmt::Display.
use flashmind_types::humanize::Tokens;
assert_eq!(Tokens(200_000).to_string(), "200k");
assert_eq!(Tokens(1_000_000).to_string(), "1M");Tuple Fields§
§0: u32Trait Implementations§
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