pub trait BitSize {
const N_BITS: u16;
const N_BYTES: u8 = _;
const N_WORDS: u16 = _;
// Provided method
fn assert_valid<const N_MAX_BYTES: u8>() { ... }
}Required Associated Constants§
Provided Associated Constants§
Provided Methods§
Sourcefn assert_valid<const N_MAX_BYTES: u8>()
fn assert_valid<const N_MAX_BYTES: u8>()
Assert that the number of bytes in the payload is valid.
If the value type is too big, the assertion would fire at compile time.
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.