pub struct NiceU8 { /* private fields */ }Expand description
Implementations§
Source§impl NiceU8
impl NiceU8
Source§impl NiceU8
impl NiceU8
Sourcepub const fn as_bytes2(&self) -> &[u8] ⓘ
pub const fn as_bytes2(&self) -> &[u8] ⓘ
§Double Digit Bytes.
This method returns a zero-padded two-byte representation of the
nice value, except for values requiring three digits (i.e. 100+).
§Examples
assert_eq!(dactyl::NiceU8::from(3).as_bytes2(), b"03");
assert_eq!(dactyl::NiceU8::from(50).as_bytes2(), b"50");
assert_eq!(dactyl::NiceU8::from(113).as_bytes2(), b"113");Sourcepub const fn as_str2(&self) -> &str
pub const fn as_str2(&self) -> &str
§Double Digit Str.
This method returns a zero-padded two-byte representation of the
nice value, except for values requiring three digits (i.e. 100+).
§Examples
assert_eq!(dactyl::NiceU8::from(3).as_str2(), "03");
assert_eq!(dactyl::NiceU8::from(50).as_str2(), "50");
assert_eq!(dactyl::NiceU8::from(113).as_str2(), "113");Trait Implementations§
impl Copy for NiceU8
impl Eq for NiceU8
Source§impl<T: Inflection> NiceInflection<NiceU8> for T
impl<T: Inflection> NiceInflection<NiceU8> for T
Source§impl NiceInflection<NiceU8> for i8
impl NiceInflection<NiceU8> for i8
Source§impl Ord for NiceU8
impl Ord for NiceU8
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
Auto Trait Implementations§
impl Freeze for NiceU8
impl RefUnwindSafe for NiceU8
impl Send for NiceU8
impl Sync for NiceU8
impl Unpin for NiceU8
impl UnsafeUnpin for NiceU8
impl UnwindSafe for NiceU8
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