[−][src]Struct hina::BitField
Methods
impl<TStorage, TAlignment> BitField<TStorage, TAlignment> where
TStorage: AsRef<[u8]> + AsMut<[u8]>,
[src]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
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]
T: From<u64>,
pub fn set_value<T>(&mut self, offset: usize, width: usize, value: T) where
T: Into<u64>,
[src]
T: Into<u64>,
Trait Implementations
impl<TStorage: PartialOrd, TAlignment: PartialOrd> PartialOrd<BitField<TStorage, TAlignment>> for BitField<TStorage, TAlignment> where
TStorage: AsRef<[u8]> + AsMut<[u8]>,
[src]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
fn partial_cmp(
&self,
other: &BitField<TStorage, TAlignment>
) -> Option<Ordering>
[src]
&self,
other: &BitField<TStorage, TAlignment>
) -> Option<Ordering>
fn lt(&self, other: &BitField<TStorage, TAlignment>) -> bool
[src]
fn le(&self, other: &BitField<TStorage, TAlignment>) -> bool
[src]
fn gt(&self, other: &BitField<TStorage, TAlignment>) -> bool
[src]
fn ge(&self, other: &BitField<TStorage, TAlignment>) -> bool
[src]
impl<TStorage: PartialEq, TAlignment: PartialEq> PartialEq<BitField<TStorage, TAlignment>> for BitField<TStorage, TAlignment> where
TStorage: AsRef<[u8]> + AsMut<[u8]>,
[src]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
fn eq(&self, other: &BitField<TStorage, TAlignment>) -> bool
[src]
fn ne(&self, other: &BitField<TStorage, TAlignment>) -> bool
[src]
impl<TStorage: Copy, TAlignment: Copy> Copy for BitField<TStorage, TAlignment> where
TStorage: AsRef<[u8]> + AsMut<[u8]>,
[src]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
impl<TStorage: Ord, TAlignment: Ord> Ord for BitField<TStorage, TAlignment> where
TStorage: AsRef<[u8]> + AsMut<[u8]>,
[src]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
fn cmp(&self, other: &BitField<TStorage, TAlignment>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.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]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
impl<TStorage: Default, TAlignment: Default> Default for BitField<TStorage, TAlignment> where
TStorage: AsRef<[u8]> + AsMut<[u8]>,
[src]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
impl<TStorage: Clone, TAlignment: Clone> Clone for BitField<TStorage, TAlignment> where
TStorage: AsRef<[u8]> + AsMut<[u8]>,
[src]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
fn clone(&self) -> BitField<TStorage, TAlignment>
[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]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
fn hash<__HTStorageTAlignment: Hasher>(&self, state: &mut __HTStorageTAlignment)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
TStorage: AsRef<[u8]> + AsMut<[u8]>,
Auto Trait Implementations
impl<TStorage, TAlignment> Send for BitField<TStorage, TAlignment> where
TAlignment: Send,
TStorage: Send,
TAlignment: Send,
TStorage: Send,
impl<TStorage, TAlignment> Unpin for BitField<TStorage, TAlignment> where
TAlignment: Unpin,
TStorage: Unpin,
TAlignment: Unpin,
TStorage: Unpin,
impl<TStorage, TAlignment> Sync for BitField<TStorage, TAlignment> where
TAlignment: Sync,
TStorage: Sync,
TAlignment: Sync,
TStorage: Sync,
impl<TStorage, TAlignment> UnwindSafe for BitField<TStorage, TAlignment> where
TAlignment: UnwindSafe,
TStorage: UnwindSafe,
TAlignment: UnwindSafe,
TStorage: UnwindSafe,
impl<TStorage, TAlignment> RefUnwindSafe for BitField<TStorage, TAlignment> where
TAlignment: RefUnwindSafe,
TStorage: RefUnwindSafe,
TAlignment: RefUnwindSafe,
TStorage: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,