pub struct ErasedState { /* private fields */ }Expand description
Runtime-selected fixed-width basis state.
This is the type-erased state boundary used by language bindings and runtime-selected bases. Arithmetic remains delegated to the same concrete fixed-width implementations used by native Rust callers.
Implementations§
Source§impl ErasedState
impl ErasedState
pub fn from_decimal(width_bits: usize, value: &str) -> Result<Self>
pub fn from_biguint(width_bits: usize, value: &BigUint) -> Result<Self>
pub const fn width_bits(&self) -> usize
pub const fn storage(&self) -> StateStorage
pub fn to_biguint(&self) -> BigUint
pub fn to_decimal(&self) -> String
Sourcepub fn bit(&self, index: usize) -> Result<bool>
pub fn bit(&self, index: usize) -> Result<bool>
Return whether one logical binary mode is occupied.
pub fn bitwise_and(&self, right: &Self) -> Result<Self>
pub fn bitwise_or(&self, right: &Self) -> Result<Self>
pub fn bitwise_xor(&self, right: &Self) -> Result<Self>
pub fn bitwise_not(&self) -> Result<Self>
pub fn left_shift(&self, shift: usize) -> Result<Self>
pub fn right_shift(&self, shift: usize) -> Self
Trait Implementations§
Source§impl BinaryState for ErasedState
impl BinaryState for ErasedState
Source§impl Clone for ErasedState
impl Clone for ErasedState
Source§fn clone(&self) -> ErasedState
fn clone(&self) -> ErasedState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErasedState
impl Debug for ErasedState
Source§impl Display for ErasedState
impl Display for ErasedState
Source§impl Hash for ErasedState
impl Hash for ErasedState
Source§impl Ord for ErasedState
impl Ord for ErasedState
1.21.0 (const: unstable) · 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 PartialEq for ErasedState
impl PartialEq for ErasedState
Source§fn eq(&self, other: &ErasedState) -> bool
fn eq(&self, other: &ErasedState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ErasedState
impl PartialOrd for ErasedState
Source§impl SymmetryMap<ErasedState> for LatticeSymmetryMap
impl SymmetryMap<ErasedState> for LatticeSymmetryMap
impl Copy for ErasedState
impl Eq for ErasedState
impl StructuralPartialEq for ErasedState
Auto Trait Implementations§
impl Freeze for ErasedState
impl RefUnwindSafe for ErasedState
impl Send for ErasedState
impl Sync for ErasedState
impl Unpin for ErasedState
impl UnsafeUnpin for ErasedState
impl UnwindSafe for ErasedState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.