Trait CheckablePrimitive

Source
pub trait CheckablePrimitive: Checkable {
    type CountType;

    // Required method
    fn read<R: BitRead + ?Sized>(
        reader: &mut R,
        count: Self::CountType,
    ) -> Result<Self>;
}
Expand description

A trait for readable types whose bit counts can be saved

Because the intent of reading checkable values is to avoid validating their values when being written, implementing the Checkable trait is required.

Required Associated Types§

Source

type CountType

Our bit count type for reading

Required Methods§

Source

fn read<R: BitRead + ?Sized>( reader: &mut R, count: Self::CountType, ) -> Result<Self>

Reads our value from the given stream

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.

Implementors§