pub struct Storage<TMarker, TData>where
TData: BitFieldAccess,{ /* private fields */ }Expand description
Stores a primitive value uniquely tagged with type TMarker and allows
bitfield access to the value through specializations of the BitField type.
Implementations§
Source§impl<TMarker> Storage<TMarker, u8>
impl<TMarker> Storage<TMarker, u8>
Sourcepub fn get<TBitField>(&self) -> u8where
TBitField: BitFieldTrait<Owner = Self>,
pub fn get<TBitField>(&self) -> u8where
TBitField: BitFieldTrait<Owner = Self>,
Gets the BitField value from storage
Sourcepub fn set<TBitField>(&mut self, value: u8)where
TBitField: BitFieldTrait<Owner = Self>,
pub fn set<TBitField>(&mut self, value: u8)where
TBitField: BitFieldTrait<Owner = Self>,
Sets the BitField value in storage
Source§impl<TMarker> Storage<TMarker, u16>
impl<TMarker> Storage<TMarker, u16>
Sourcepub fn get<TBitField>(&self) -> u16where
TBitField: BitFieldTrait<Owner = Self>,
pub fn get<TBitField>(&self) -> u16where
TBitField: BitFieldTrait<Owner = Self>,
Gets the BitField value from storage
Sourcepub fn set<TBitField>(&mut self, value: u16)where
TBitField: BitFieldTrait<Owner = Self>,
pub fn set<TBitField>(&mut self, value: u16)where
TBitField: BitFieldTrait<Owner = Self>,
Sets the BitField value in storage
Source§impl<TMarker> Storage<TMarker, u32>
impl<TMarker> Storage<TMarker, u32>
Sourcepub fn get<TBitField>(&self) -> u32where
TBitField: BitFieldTrait<Owner = Self>,
pub fn get<TBitField>(&self) -> u32where
TBitField: BitFieldTrait<Owner = Self>,
Gets the BitField value from storage
Sourcepub fn set<TBitField>(&mut self, value: u32)where
TBitField: BitFieldTrait<Owner = Self>,
pub fn set<TBitField>(&mut self, value: u32)where
TBitField: BitFieldTrait<Owner = Self>,
Sets the BitField value in storage
Source§impl<TMarker> Storage<TMarker, u64>
impl<TMarker> Storage<TMarker, u64>
Sourcepub fn get<TBitField>(&self) -> u64where
TBitField: BitFieldTrait<Owner = Self>,
pub fn get<TBitField>(&self) -> u64where
TBitField: BitFieldTrait<Owner = Self>,
Gets the BitField value from storage
Sourcepub fn set<TBitField>(&mut self, value: u64)where
TBitField: BitFieldTrait<Owner = Self>,
pub fn set<TBitField>(&mut self, value: u64)where
TBitField: BitFieldTrait<Owner = Self>,
Sets the BitField value in storage
Source§impl<TMarker> Storage<TMarker, usize>
impl<TMarker> Storage<TMarker, usize>
Sourcepub fn get<TBitField>(&self) -> usizewhere
TBitField: BitFieldTrait<Owner = Self>,
pub fn get<TBitField>(&self) -> usizewhere
TBitField: BitFieldTrait<Owner = Self>,
Gets the BitField value from storage
Sourcepub fn set<TBitField>(&mut self, value: usize)where
TBitField: BitFieldTrait<Owner = Self>,
pub fn set<TBitField>(&mut self, value: usize)where
TBitField: BitFieldTrait<Owner = Self>,
Sets the BitField value in storage
Trait Implementations§
Source§impl<TMarker: Clone, TData> Clone for Storage<TMarker, TData>where
TData: BitFieldAccess + Clone,
impl<TMarker: Clone, TData> Clone for Storage<TMarker, TData>where
TData: BitFieldAccess + Clone,
Source§impl<TMarker: Debug, TData> Debug for Storage<TMarker, TData>where
TData: BitFieldAccess + Debug,
impl<TMarker: Debug, TData> Debug for Storage<TMarker, TData>where
TData: BitFieldAccess + Debug,
Source§impl<TMarker: Default, TData> Default for Storage<TMarker, TData>where
TData: BitFieldAccess + Default,
impl<TMarker: Default, TData> Default for Storage<TMarker, TData>where
TData: BitFieldAccess + Default,
Source§impl<TMarker: Hash, TData> Hash for Storage<TMarker, TData>where
TData: BitFieldAccess + Hash,
impl<TMarker: Hash, TData> Hash for Storage<TMarker, TData>where
TData: BitFieldAccess + Hash,
Source§impl<TMarker: Ord, TData> Ord for Storage<TMarker, TData>where
TData: BitFieldAccess + Ord,
impl<TMarker: Ord, TData> Ord for Storage<TMarker, TData>where
TData: BitFieldAccess + Ord,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<TMarker: PartialEq, TData> PartialEq for Storage<TMarker, TData>where
TData: BitFieldAccess + PartialEq,
impl<TMarker: PartialEq, TData> PartialEq for Storage<TMarker, TData>where
TData: BitFieldAccess + PartialEq,
Source§impl<TMarker: PartialOrd, TData> PartialOrd for Storage<TMarker, TData>where
TData: BitFieldAccess + PartialOrd,
impl<TMarker: PartialOrd, TData> PartialOrd for Storage<TMarker, TData>where
TData: BitFieldAccess + PartialOrd,
impl<TMarker: Copy, TData> Copy for Storage<TMarker, TData>where
TData: BitFieldAccess + Copy,
impl<TMarker: Eq, TData> Eq for Storage<TMarker, TData>where
TData: BitFieldAccess + Eq,
impl<TMarker, TData> StructuralPartialEq for Storage<TMarker, TData>where
TData: BitFieldAccess,
Auto Trait Implementations§
impl<TMarker, TData> Freeze for Storage<TMarker, TData>where
TData: Freeze,
impl<TMarker, TData> RefUnwindSafe for Storage<TMarker, TData>where
TData: RefUnwindSafe,
TMarker: RefUnwindSafe,
impl<TMarker, TData> Send for Storage<TMarker, TData>
impl<TMarker, TData> Sync for Storage<TMarker, TData>
impl<TMarker, TData> Unpin for Storage<TMarker, TData>
impl<TMarker, TData> UnwindSafe for Storage<TMarker, TData>where
TData: UnwindSafe,
TMarker: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more