[][src]Struct nanobv::NanoBV

pub struct NanoBV<T = u32> { /* fields omitted */ }

Implementations

impl<T> NanoBV<T>[src]

pub const fn len(&self) -> usize[src]

Retrieve length of the current NanoBV.

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.

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.

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.

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.

impl<T: Clone> Clone for NanoBV<T>[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.

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.

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.

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.

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.

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]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

impl<T> Send for NanoBV<T> where
    T: Send
[src]

impl<T> Sync for NanoBV<T> where
    T: Sync
[src]

impl<T> Unpin for NanoBV<T> where
    T: Unpin
[src]

Blanket Implementations

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

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

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

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.