[−][src]Struct nanobv::NanoBV
Implementations
impl<T> NanoBV<T>
[src]
impl NanoBV<u8>
[src]
pub const fn new(data: u8, length: usize) -> Self
[src]
Create a new NanoBV
.
pub const fn default() -> Self
[src]
Create a NanoBV
initialized to 0 with length equivalent to the size of the
stored type.
pub const fn value(&self) -> u8
[src]
Retrieve value of the current NanoBV.
pub const fn set_value(&self, value: u8) -> Self
[src]
Set value of the current NanoBV while retaining length.
pub const fn zeros(length: usize) -> Self
[src]
Create NanoBV
with all bits unset.
pub const fn ones(length: usize) -> Self
[src]
Create NanoBV
with all bits set.
pub const fn clear(&self) -> Self
[src]
Clear all bits.
pub const fn set(&self) -> Self
[src]
Set all bits.
pub const fn get_bit(&self, offset: u8) -> u8
[src]
Get bit at offset.
pub const fn set_bit(&self, offset: u8) -> Self
[src]
Set bit at offset.
pub const fn clear_bit(&self, offset: u8) -> Self
[src]
Clear bit at offset.
pub const fn assign_bit(&self, value: u8, offset: u8) -> Self
[src]
Assign bit at offset.
pub const fn reverse(&self) -> Self
[src]
Reverse bits.
pub const fn bvadd(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Add
.
pub const fn bvand(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitAnd
.
pub const fn bvor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitOr
.
pub const fn bvxor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitXor
.
pub const fn bvdiv(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Div
.
pub const fn bvmul(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Mul
.
pub const fn bvrem(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Rem
.
pub const fn bvshl(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shl
.
pub const fn bvshr(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shr
.
pub const fn bvsub(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Sub
.
impl NanoBV<u16>
[src]
pub const fn new(data: u16, length: usize) -> Self
[src]
Create a new NanoBV
.
pub const fn default() -> Self
[src]
Create a NanoBV
initialized to 0 with length equivalent to the size of the
stored type.
pub const fn value(&self) -> u16
[src]
Retrieve value of the current NanoBV.
pub const fn set_value(&self, value: u16) -> Self
[src]
Set value of the current NanoBV while retaining length.
pub const fn zeros(length: usize) -> Self
[src]
Create NanoBV
with all bits unset.
pub const fn ones(length: usize) -> Self
[src]
Create NanoBV
with all bits set.
pub const fn clear(&self) -> Self
[src]
Clear all bits.
pub const fn set(&self) -> Self
[src]
Set all bits.
pub const fn get_bit(&self, offset: u16) -> u16
[src]
Get bit at offset.
pub const fn set_bit(&self, offset: u16) -> Self
[src]
Set bit at offset.
pub const fn clear_bit(&self, offset: u16) -> Self
[src]
Clear bit at offset.
pub const fn assign_bit(&self, value: u16, offset: u16) -> Self
[src]
Assign bit at offset.
pub const fn reverse(&self) -> Self
[src]
Reverse bits.
pub const fn bvadd(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Add
.
pub const fn bvand(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitAnd
.
pub const fn bvor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitOr
.
pub const fn bvxor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitXor
.
pub const fn bvdiv(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Div
.
pub const fn bvmul(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Mul
.
pub const fn bvrem(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Rem
.
pub const fn bvshl(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shl
.
pub const fn bvshr(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shr
.
pub const fn bvsub(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Sub
.
impl NanoBV<u32>
[src]
pub const fn new(data: u32, length: usize) -> Self
[src]
Create a new NanoBV
.
pub const fn default() -> Self
[src]
Create a NanoBV
initialized to 0 with length equivalent to the size of the
stored type.
pub const fn value(&self) -> u32
[src]
Retrieve value of the current NanoBV.
pub const fn set_value(&self, value: u32) -> Self
[src]
Set value of the current NanoBV while retaining length.
pub const fn zeros(length: usize) -> Self
[src]
Create NanoBV
with all bits unset.
pub const fn ones(length: usize) -> Self
[src]
Create NanoBV
with all bits set.
pub const fn clear(&self) -> Self
[src]
Clear all bits.
pub const fn set(&self) -> Self
[src]
Set all bits.
pub const fn get_bit(&self, offset: u32) -> u32
[src]
Get bit at offset.
pub const fn set_bit(&self, offset: u32) -> Self
[src]
Set bit at offset.
pub const fn clear_bit(&self, offset: u32) -> Self
[src]
Clear bit at offset.
pub const fn assign_bit(&self, value: u32, offset: u32) -> Self
[src]
Assign bit at offset.
pub const fn reverse(&self) -> Self
[src]
Reverse bits.
pub const fn bvadd(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Add
.
pub const fn bvand(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitAnd
.
pub const fn bvor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitOr
.
pub const fn bvxor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitXor
.
pub const fn bvdiv(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Div
.
pub const fn bvmul(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Mul
.
pub const fn bvrem(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Rem
.
pub const fn bvshl(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shl
.
pub const fn bvshr(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shr
.
pub const fn bvsub(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Sub
.
impl NanoBV<u64>
[src]
pub const fn new(data: u64, length: usize) -> Self
[src]
Create a new NanoBV
.
pub const fn default() -> Self
[src]
Create a NanoBV
initialized to 0 with length equivalent to the size of the
stored type.
pub const fn value(&self) -> u64
[src]
Retrieve value of the current NanoBV.
pub const fn set_value(&self, value: u64) -> Self
[src]
Set value of the current NanoBV while retaining length.
pub const fn zeros(length: usize) -> Self
[src]
Create NanoBV
with all bits unset.
pub const fn ones(length: usize) -> Self
[src]
Create NanoBV
with all bits set.
pub const fn clear(&self) -> Self
[src]
Clear all bits.
pub const fn set(&self) -> Self
[src]
Set all bits.
pub const fn get_bit(&self, offset: u64) -> u64
[src]
Get bit at offset.
pub const fn set_bit(&self, offset: u64) -> Self
[src]
Set bit at offset.
pub const fn clear_bit(&self, offset: u64) -> Self
[src]
Clear bit at offset.
pub const fn assign_bit(&self, value: u64, offset: u64) -> Self
[src]
Assign bit at offset.
pub const fn reverse(&self) -> Self
[src]
Reverse bits.
pub const fn bvadd(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Add
.
pub const fn bvand(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitAnd
.
pub const fn bvor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitOr
.
pub const fn bvxor(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::BitXor
.
pub const fn bvdiv(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Div
.
pub const fn bvmul(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Mul
.
pub const fn bvrem(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Rem
.
pub const fn bvshl(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shl
.
pub const fn bvshr(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Shr
.
pub const fn bvsub(&self, rhs: Self) -> Self
[src]
const_fn alternative to core::ops::Sub
.
Trait Implementations
impl<T: Add + Add<Output = T> + TryFrom<u128> + TryInto<u128> + Default> Add<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the +
operator.
pub fn add(self, other: Self) -> Self
[src]
impl<T: BitAnd + BitAnd<Output = T> + TryFrom<u128> + TryInto<u128> + Default> BitAnd<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the &
operator.
pub fn bitand(self, other: Self) -> Self
[src]
impl<T: BitOr + BitOr<Output = T> + TryFrom<u128> + TryInto<u128> + Default> BitOr<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the |
operator.
pub fn bitor(self, other: Self) -> Self
[src]
impl<T: BitXor + BitXor<Output = T> + TryFrom<u128> + TryInto<u128> + Default> BitXor<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the ^
operator.
pub fn bitxor(self, other: Self) -> Self
[src]
impl<T: Clone> Clone for NanoBV<T>
[src]
pub fn clone(&self) -> NanoBV<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy> Copy for NanoBV<T>
[src]
impl<T: Debug> Debug for NanoBV<T>
[src]
impl<T: Div + Div<Output = T> + TryFrom<u128> + TryInto<u128> + Default> Div<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the /
operator.
pub fn div(self, other: Self) -> Self
[src]
impl<T: Eq> Eq for NanoBV<T>
[src]
impl<T: Mul + Mul<Output = T> + TryFrom<u128> + TryInto<u128> + Default> Mul<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the *
operator.
pub fn mul(self, other: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<NanoBV<T>> for NanoBV<T>
[src]
impl<T: Rem + Rem<Output = T> + TryFrom<u128> + TryInto<u128> + Default> Rem<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the %
operator.
pub fn rem(self, other: Self) -> Self
[src]
impl<T: Shl + Shl<Output = T> + TryFrom<u128> + TryInto<u128> + Default> Shl<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the <<
operator.
pub fn shl(self, other: Self) -> Self
[src]
impl<T: Shr + Shr<Output = T> + TryFrom<u128> + TryInto<u128> + Default> Shr<NanoBV<T>> for NanoBV<T>
[src]
type Output = Self
The resulting type after applying the >>
operator.
pub fn shr(self, other: Self) -> Self
[src]
impl<T> StructuralEq for NanoBV<T>
[src]
impl<T> StructuralPartialEq for NanoBV<T>
[src]
impl<T: Sub + Sub<Output = T> + TryFrom<u128> + TryInto<u128> + Default> Sub<NanoBV<T>> for NanoBV<T>
[src]
Auto Trait Implementations
impl<T> Send for NanoBV<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for NanoBV<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for NanoBV<T> where
T: Unpin,
[src]
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &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.
pub 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>,