pub struct Signal {
pub name: String,
pub bits: usize,
pub typ: SignalType,
}Expand description
Represent a input or output signal of the device under test
Fields§
§name: StringName of the signal
bits: usizeBit width of the signal
typ: SignalTypeThe type of the signal
Implementations§
Source§impl Signal
impl Signal
Sourcepub fn input(
name: impl Into<String>,
bits: usize,
default: impl Into<InputValue>,
) -> Self
pub fn input( name: impl Into<String>, bits: usize, default: impl Into<InputValue>, ) -> Self
Construct an Input signal
Sourcepub fn bidirectional(
name: impl Into<String>,
bits: usize,
default: impl Into<InputValue>,
) -> Self
pub fn bidirectional( name: impl Into<String>, bits: usize, default: impl Into<InputValue>, ) -> Self
Construct a Bidirectional signal
Sourcepub fn is_bidirectional(&self) -> bool
pub fn is_bidirectional(&self) -> bool
Is this signal bidirectional?
Sourcepub fn default_value(&self) -> Option<InputValue>
pub fn default_value(&self) -> Option<InputValue>
Extract the default value of an Input or Bidirectional signal.
Returns None if the signal is an Output or a Virtual signal.
Trait Implementations§
impl Eq for Signal
impl StructuralPartialEq for Signal
Auto Trait Implementations§
impl Freeze for Signal
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