pub trait TinyStrInt:
Copy
+ Clone
+ Eq
+ Ord
+ Hash
+ Sized {
type Bytes: Copy + Default + AsMut<[u8]> + AsRef<[u8]>;
type Raw: Copy + Default;
const LEN: usize;
// Required methods
fn to_be_bytes(self) -> Self::Bytes;
fn trailing_zeros(self) -> u32;
fn set_raw(accumulator: Self::Raw, byte: u8, pos: usize) -> Self::Raw;
fn from_raw(raw: Self::Raw) -> Option<Self>;
}Expand description
Helper trait for integer types that can be used as storage for a TinyStr.
Required Associated Constants§
Required Associated Types§
Required Methods§
fn to_be_bytes(self) -> Self::Bytes
fn trailing_zeros(self) -> u32
fn set_raw(accumulator: Self::Raw, byte: u8, pos: usize) -> Self::Raw
fn from_raw(raw: Self::Raw) -> Option<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.