[][src]Struct hina::BitField

#[repr(C)]
pub struct BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
{ /* fields omitted */ }

Methods

impl<TStorage, TAlignment> BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

pub fn new(storage: TStorage) -> Self[src]

pub fn get(&self, index: usize) -> bool[src]

pub fn set(&mut self, index: usize, value: bool)[src]

pub fn get_value<T>(&self, offset: usize, width: usize) -> T where
    T: From<u64>, 
[src]

pub fn set_value<T>(&mut self, offset: usize, width: usize, value: T) where
    T: Into<u64>, 
[src]

Trait Implementations

impl<TStorage: PartialOrd, TAlignment: PartialOrd> PartialOrd<BitField<TStorage, TAlignment>> for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

impl<TStorage: PartialEq, TAlignment: PartialEq> PartialEq<BitField<TStorage, TAlignment>> for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

impl<TStorage: Copy, TAlignment: Copy> Copy for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

impl<TStorage: Ord, TAlignment: Ord> Ord for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<TStorage: Eq, TAlignment: Eq> Eq for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

impl<TStorage: Default, TAlignment: Default> Default for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

impl<TStorage: Clone, TAlignment: Clone> Clone for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<TStorage: Hash, TAlignment: Hash> Hash for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<TStorage: Debug, TAlignment: Debug> Debug for BitField<TStorage, TAlignment> where
    TStorage: AsRef<[u8]> + AsMut<[u8]>, 
[src]

Auto Trait Implementations

impl<TStorage, TAlignment> Send for BitField<TStorage, TAlignment> where
    TAlignment: Send,
    TStorage: Send

impl<TStorage, TAlignment> Unpin for BitField<TStorage, TAlignment> where
    TAlignment: Unpin,
    TStorage: Unpin

impl<TStorage, TAlignment> Sync for BitField<TStorage, TAlignment> where
    TAlignment: Sync,
    TStorage: Sync

impl<TStorage, TAlignment> UnwindSafe for BitField<TStorage, TAlignment> where
    TAlignment: UnwindSafe,
    TStorage: UnwindSafe

impl<TStorage, TAlignment> RefUnwindSafe for BitField<TStorage, TAlignment> where
    TAlignment: RefUnwindSafe,
    TStorage: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,