Skip to main content

InfallibleWrite

Trait InfallibleWrite 

Source
pub trait InfallibleWrite {
    type WriteValue;
    type Output;

    // Required method
    fn write(self, val: Self::WriteValue) -> Self::Output;
}
Expand description

Infallible write operation for views in a verified typestate (IsComplete), consuming self and transitioning to the mutated state.

Required Associated Types§

Required Methods§

Source

fn write(self, val: Self::WriteValue) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, Inner> InfallibleWrite for EnumViewMut<T, Inner>
where Inner: InfallibleWrite, Inner::WriteValue: From<T>,

Source§

impl<const BITS: usize, E: ByteOrder, S: MutStorage, ST: IsComplete> InfallibleWrite for Flag<BITS, E, S, ST>

Source§

impl<const BITS: usize, E: ByteOrder, S: MutStorage, ST: IsComplete> InfallibleWrite for Int<BITS, E, S, ST>

Source§

type WriteValue = <SizeSelector<BITS> as SmallestInt>::T

Source§

type Output = Int<BITS, E, S, <ST as State>::OnLayoutMutation>

Source§

impl<const BITS: usize, E: ByteOrder, S: MutStorage, ST: IsComplete> InfallibleWrite for UInt<BITS, E, S, ST>

Source§

impl<const BITS: usize, const BIT_OFFSET: usize, E: ByteOrder, S: MutStorage, ST: IsComplete> InfallibleWrite for BitFlag<BITS, BIT_OFFSET, E, S, ST>

Source§

type WriteValue = bool

Source§

type Output = BitFlag<BITS, BIT_OFFSET, E, S, <ST as State>::OnLayoutMutation>