pub struct SimDuration {
pub steps: u64,
}Expand description
A span of simulation time in simulator precision steps. Unit-safe
constructors (mapping row 13): SimDuration::ns(2).
Fields§
§steps: u64Implementations§
Source§impl SimDuration
impl SimDuration
pub fn steps(steps: u64) -> SimDuration
pub fn fs(n: u64) -> SimDuration
pub fn ps(n: u64) -> SimDuration
pub fn ns(n: u64) -> SimDuration
pub fn us(n: u64) -> SimDuration
pub fn ms(n: u64) -> SimDuration
pub fn sec(n: u64) -> SimDuration
Sourcepub fn from_unit(n: u64, unit: &str) -> SimDuration
pub fn from_unit(n: u64, unit: &str) -> SimDuration
Parse a cocotb-style unit name (“ns”, “us”, …).
Trait Implementations§
Source§impl Clone for SimDuration
impl Clone for SimDuration
Source§fn clone(&self) -> SimDuration
fn clone(&self) -> SimDuration
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 moreimpl Copy for SimDuration
Source§impl Debug for SimDuration
impl Debug for SimDuration
impl Eq for SimDuration
Source§impl Ord for SimDuration
impl Ord for SimDuration
Source§fn cmp(&self, other: &SimDuration) -> Ordering
fn cmp(&self, other: &SimDuration) -> Ordering
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 SimDuration
impl PartialEq for SimDuration
Source§impl PartialOrd for SimDuration
impl PartialOrd for SimDuration
impl StructuralPartialEq for SimDuration
Auto Trait Implementations§
impl Freeze for SimDuration
impl RefUnwindSafe for SimDuration
impl Send for SimDuration
impl Sync for SimDuration
impl Unpin for SimDuration
impl UnsafeUnpin for SimDuration
impl UnwindSafe for SimDuration
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