pub struct Signal { /* private fields */ }
Expand description
Representation of a signal (a boolean variable or its complement)
May be 0, 1, x or !x. Design inputs and constants get a special representation.
Implementations§
source§impl Signal
impl Signal
sourcepub fn from_input(v: u32) -> Signal
pub fn from_input(v: u32) -> Signal
Create a signal from a design input index
sourcepub fn ind(&self) -> u32
pub fn ind(&self) -> u32
Obtain the internal index associated with the signal: 0 for a constant, otherwise var() + 1
sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Returns true if the signal represents a constant
sourcepub fn is_inverted(&self) -> bool
pub fn is_inverted(&self) -> bool
Returns true if the signal is implicitly inverted
False for inputs, variables and zero. True for their complement and for one.
Trait Implementations§
source§impl BitXorAssign<bool> for Signal
impl BitXorAssign<bool> for Signal
source§fn bitxor_assign(&mut self, rhs: bool)
fn bitxor_assign(&mut self, rhs: bool)
Performs the
^=
operation. Read moresource§impl Ord for Signal
impl Ord for Signal
source§impl PartialEq for Signal
impl PartialEq for Signal
source§impl PartialOrd for Signal
impl PartialOrd for Signal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Signal
impl Eq for Signal
impl StructuralEq for Signal
impl StructuralPartialEq for Signal
Auto Trait Implementations§
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnwindSafe for Signal
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