pub trait FieldType: Sized {
const IS_SIGNED: bool;
const TOTAL_BIT_SIZE: usize = _;
// Required methods
fn get_bit(&self, bit: usize) -> bool;
fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self;
// Provided method
fn set_field(&self, field: &mut [u8], bit_range: (usize, usize)) { ... }
}
Required Associated Constants§
Provided Associated Constants§
const TOTAL_BIT_SIZE: usize = _
Required Methods§
fn get_bit(&self, bit: usize) -> bool
fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self
Provided Methods§
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.