pub trait ReadUnchecked<'a> {
type HostType: Sized;
const SIZE: usize;
unsafe fn read_unchecked(ctxt: &mut ReadCtxt<'a>) -> Self::HostType;
}
Expand description
Read will always succeed if sufficient bytes are available.
Required Associated Types
Required Associated Constants
Required Methods
unsafe fn read_unchecked(ctxt: &mut ReadCtxt<'a>) -> Self::HostType
unsafe fn read_unchecked(ctxt: &mut ReadCtxt<'a>) -> Self::HostType
Must read exactly SIZE
bytes.
Unsafe as it avoids prohibitively expensive per-byte bounds checking.