pub struct Value(/* private fields */);Expand description
A value is a (possibly empty) sequence of ValueBits.
Implementations§
Source§impl Value
impl Value
pub fn push(&mut self, new_net: impl Into<ValueBit>)
pub fn as_slice(&self) -> &ValueSlice
pub fn as_slice_mut(&mut self) -> &mut ValueSlice
Methods from Deref<Target = ValueSlice>§
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter( &self, ) -> impl DoubleEndedIterator<Item = ValueBit> + ExactSizeIterator + '_
pub fn iter_mut( &mut self, ) -> impl DoubleEndedIterator<Item = &mut ValueBit> + ExactSizeIterator + '_
pub fn is_undef(&self) -> bool
pub fn is_zero(&self) -> bool
pub fn is_ones(&self) -> bool
pub fn lsb(&self) -> ValueBit
pub fn msb(&self) -> ValueBit
pub fn has_undef(&self) -> bool
pub fn as_const(&self) -> Option<Const>
pub fn as_net(&self) -> Option<ValueBit>
pub fn unwrap_net(&self) -> ValueBit
pub fn concat(&self, other: impl AsRef<ValueSlice>) -> Value
pub fn repeat(&self, count: usize) -> Value
pub fn slice(&self, range: impl RangeBounds<usize>) -> Value
pub fn zext(&self, width: usize) -> Value
pub fn sext(&self, width: usize) -> Value
pub fn shl(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value
pub fn ushr(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value
pub fn sshr(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value
pub fn xshr(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value
pub fn visit(&self, f: impl FnMut(ValueBit))
pub fn visit_mut(&mut self, f: impl FnMut(&mut ValueBit))
pub fn copy_from_slice(&mut self, other: impl AsRef<ValueSlice>)
Trait Implementations§
Source§impl AsMut<ValueSlice> for Value
impl AsMut<ValueSlice> for Value
Source§fn as_mut(&mut self) -> &mut ValueSlice
fn as_mut(&mut self) -> &mut ValueSlice
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<ValueSlice> for Value
impl AsRef<ValueSlice> for Value
Source§fn as_ref(&self) -> &ValueSlice
fn as_ref(&self) -> &ValueSlice
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<ValueSlice> for Value
impl Borrow<ValueSlice> for Value
Source§fn borrow(&self) -> &ValueSlice
fn borrow(&self) -> &ValueSlice
Immutably borrows from an owned value. Read more
Source§impl BorrowMut<ValueSlice> for Value
impl BorrowMut<ValueSlice> for Value
Source§fn borrow_mut(&mut self) -> &mut ValueSlice
fn borrow_mut(&mut self) -> &mut ValueSlice
Mutably borrows from an owned value. Read more
impl Eq for Value
Source§impl Extend<ValueBit> for Value
impl Extend<ValueBit> for Value
Source§fn extend<T: IntoIterator<Item = ValueBit>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = ValueBit>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<&ConstSlice> for Value
impl From<&ConstSlice> for Value
Source§fn from(value: &ConstSlice) -> Self
fn from(value: &ConstSlice) -> Self
Converts to this type from the input type.
Source§impl From<&ValueSlice> for Value
impl From<&ValueSlice> for Value
Source§fn from(value: &ValueSlice) -> Self
fn from(value: &ValueSlice) -> Self
Converts to this type from the input type.
Source§impl From<Value> for RewriteResult
impl From<Value> for RewriteResult
Source§impl FromIterator<ValueBit> for Value
impl FromIterator<ValueBit> for Value
Source§impl<'a> IntoIterator for &'a Value
impl<'a> IntoIterator for &'a Value
Source§impl IntoIterator for Value
impl IntoIterator for Value
Source§impl Ord for Value
impl Ord for Value
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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.