[][src]Struct slot_clock::TestingSlotClock

pub struct TestingSlotClock { /* fields omitted */ }

A slot clock where the slot is manually set instead of being determined by the system time.

Useful for testing scenarios.


impl TestingSlotClock[src]

pub fn set_slot(&self, slot: u64)[src]

pub fn advance_slot(&self)[src]

Trait Implementations

impl SlotClock for TestingSlotClock[src]

fn duration_to_next_slot(&self) -> Option<Duration>[src]

Always returns a duration of 1 second.

fn slot_duration(&self) -> Duration[src]

Always returns a slot duration of 0 seconds.

Auto Trait Implementations

impl Send for TestingSlotClock

impl Unpin for TestingSlotClock

impl Sync for TestingSlotClock

impl UnwindSafe for TestingSlotClock

impl RefUnwindSafe for TestingSlotClock

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,