Trait bitfield_layout::BitFieldLayout [−][src]
pub trait BitFieldLayout: Layout { type Value: Copy + IntoBits; fn get(&self) -> Self::Value; fn set(&mut self, new: Self::Value); fn replace(&mut self, new: Self::Value) -> Self::Value { ... } fn swap(&mut self, other: &mut Self) { ... } fn update<F>(&mut self, f: F) -> Self::Value
where
F: FnOnce(Self::Value) -> Self::Value, { ... } fn bits(&self) -> Bits<<Self::Value as IntoBits>::Bytes>ⓘ { ... } fn flags(
&self
) -> Flags<Self::Layout, Bits<<Self::Value as IntoBits>::Bytes>>ⓘ { ... } fn diff(
&self,
other: Self
) -> Diff<Self::Layout, Bits<<Self::Value as IntoBits>::Bytes>>ⓘ
where
Self: Sized, { ... } }
Expand description
Associated Types
Required methods
Provided methods
fn replace(&mut self, new: Self::Value) -> Self::Value[src]
fn replace(&mut self, new: Self::Value) -> Self::Value[src]Replaces the contained value with val, and returns the old contained value.
fn swap(&mut self, other: &mut Self)[src]
fn swap(&mut self, other: &mut Self)[src]Swaps the values of two bitfields.
fn update<F>(&mut self, f: F) -> Self::Value where
F: FnOnce(Self::Value) -> Self::Value, [src]
fn update<F>(&mut self, f: F) -> Self::Value where
F: FnOnce(Self::Value) -> Self::Value, [src]Updates the contained value using a function and returns the new value.
fn bits(&self) -> Bits<<Self::Value as IntoBits>::Bytes>ⓘ[src]
fn bits(&self) -> Bits<<Self::Value as IntoBits>::Bytes>ⓘ[src]Return iterator through bitfield value bits. Every bit represents as bool value.
fn flags(&self) -> Flags<Self::Layout, Bits<<Self::Value as IntoBits>::Bytes>>ⓘ[src]
fn flags(&self) -> Flags<Self::Layout, Bits<<Self::Value as IntoBits>::Bytes>>ⓘ[src]Return iterator through bitfield value flags. Every flag contains bit state (set or unset) and item (record) value - string in simple case.