Skip to main content

ValueSlice

Struct ValueSlice 

Source
pub struct ValueSlice(/* private fields */);

Implementations§

Source§

impl ValueSlice

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn iter( &self, ) -> impl DoubleEndedIterator<Item = ValueBit> + ExactSizeIterator + '_

Source

pub fn iter_mut( &mut self, ) -> impl DoubleEndedIterator<Item = &mut ValueBit> + ExactSizeIterator + '_

Source

pub fn is_undef(&self) -> bool

Source

pub fn is_zero(&self) -> bool

Source

pub fn is_ones(&self) -> bool

Source

pub fn lsb(&self) -> ValueBit

Source

pub fn msb(&self) -> ValueBit

Source

pub fn has_undef(&self) -> bool

Source

pub fn as_const(&self) -> Option<Const>

Source

pub fn as_net(&self) -> Option<ValueBit>

Source

pub fn unwrap_net(&self) -> ValueBit

Source

pub fn concat(&self, other: impl AsRef<ValueSlice>) -> Value

Source

pub fn repeat(&self, count: usize) -> Value

Source

pub fn slice(&self, range: impl RangeBounds<usize>) -> Value

Source

pub fn zext(&self, width: usize) -> Value

Source

pub fn sext(&self, width: usize) -> Value

Source

pub fn shl(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value

Source

pub fn ushr(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value

Source

pub fn sshr(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value

Source

pub fn xshr(&self, other: impl AsRef<ConstSlice>, stride: u32) -> Value

Source

pub fn visit(&self, f: impl FnMut(ValueBit))

Source

pub fn visit_mut(&mut self, f: impl FnMut(&mut ValueBit))

Source

pub fn copy_from_slice(&mut self, other: impl AsRef<ValueSlice>)

Trait Implementations§

Source§

impl AsMut<ValueSlice> for ValueSlice

Source§

fn as_mut(&mut self) -> &mut ValueSlice

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<ValueSlice> for Value

Source§

fn as_mut(&mut self) -> &mut ValueSlice

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<ValueSlice> for ValueBit

Source§

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 ValueSlice

Source§

fn as_ref(&self) -> &ValueSlice

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<ValueSlice> for Value

Source§

fn as_ref(&self) -> &ValueSlice

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<ValueSlice> for ValueBit

Source§

fn as_ref(&self) -> &ValueSlice

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<ValueSlice> for Value

Source§

fn borrow(&self) -> &ValueSlice

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<ValueSlice> for Value

Source§

fn borrow_mut(&mut self) -> &mut ValueSlice

Mutably borrows from an owned value. Read more
Source§

impl Eq for ValueSlice

Source§

impl From<&ValueSlice> for Value

Source§

fn from(value: &ValueSlice) -> Self

Converts to this type from the input type.
Source§

impl Hash for ValueSlice

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl<Idx, Wrap> Index<Idx> for ValueSlice
where Idx: SliceIndex<[ValueBit], Output = Wrap>, Wrap: ValueIndexWrapper + 'static + ?Sized,

Source§

type Output = <Wrap as ValueIndexWrapper>::Output

The returned type after indexing.
Source§

fn index(&self, index: Idx) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<Idx, Wrap> IndexMut<Idx> for ValueSlice
where Idx: SliceIndex<[ValueBit], Output = Wrap>, Wrap: ValueIndexWrapper + 'static + ?Sized,

Source§

fn index_mut(&mut self, index: Idx) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a> IntoIterator for &'a ValueSlice

Source§

type Item = ValueBit

The type of the elements being iterated over.
Source§

type IntoIter = Copied<Iter<'a, ValueBit>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Ord for ValueSlice

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl PartialEq for ValueSlice

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for ValueSlice

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for ValueSlice

Source§

impl ToOwned for ValueSlice

Source§

type Owned = Value

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl TransparentWrapper<[ValueBit]> for ValueSlice

§

fn wrap_ref(s: &Inner) -> &Self

Convert a reference to the inner type into a reference to the wrapper type.
§

fn wrap_mut(s: &mut Inner) -> &mut Self

Convert a mutable reference to the inner type into a mutable reference to the wrapper type.
§

fn peel_ref(s: &Self) -> &Inner

Convert a reference to the wrapper type into a reference to the inner type.
§

fn peel_mut(s: &mut Self) -> &mut Inner

Convert a mutable reference to the wrapper type into a mutable reference to the inner type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.