pub trait Sealed {
type Pos: Default + Clone;
type Overhead: ArraySize;
const NAME: &'static str;
// Required methods
fn get_pos<N: ArraySize>(
buf: &MaybeUninit<Array<u8, N>>,
pos: &Self::Pos,
) -> usize;
fn set_pos<N: ArraySize>(
buf: &mut MaybeUninit<Array<u8, N>>,
pos: &mut Self::Pos,
val: usize,
);
fn invariant(pos: usize, block_size: usize) -> bool;
fn split_blocks<N: ArraySize>(data: &[u8]) -> (&[Array<u8, N>], &[u8]);
}Expand description
Sealed trait for buffer kinds.
Required Associated Constants§
Required Associated Types§
Required Methods§
fn get_pos<N: ArraySize>( buf: &MaybeUninit<Array<u8, N>>, pos: &Self::Pos, ) -> usize
fn set_pos<N: ArraySize>( buf: &mut MaybeUninit<Array<u8, N>>, pos: &mut Self::Pos, val: usize, )
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.