Struct netem_trace::model::delay::StaticDelay
source · pub struct StaticDelay {
pub delay: Delay,
pub duration: Option<Duration>,
}Expand description
The model of a static delay trace.
Examples
let mut static_delay = StaticDelayConfig::new()
.delay(Delay::from_millis(10))
.duration(Duration::from_secs(1))
.build();
assert_eq!(static_delay.next_delay(), Some((Delay::from_millis(10), Duration::from_secs(1))));
assert_eq!(static_delay.next_delay(), None);Fields§
§delay: Delay§duration: Option<Duration>Trait Implementations§
source§impl Clone for StaticDelay
impl Clone for StaticDelay
source§fn clone(&self) -> StaticDelay
fn clone(&self) -> StaticDelay
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for StaticDelay
impl Debug for StaticDelay
source§impl DelayTrace for StaticDelay
impl DelayTrace for StaticDelay
Auto Trait Implementations§
impl RefUnwindSafe for StaticDelay
impl Send for StaticDelay
impl Sync for StaticDelay
impl Unpin for StaticDelay
impl UnwindSafe for StaticDelay
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