Struct s2n_netbench::Driver
source · pub struct Driver<'a, C: Connection> {
pub connection: C,
/* private fields */
}
Fields§
§connection: C
Implementations§
source§impl<'a, C: Connection> Driver<'a, C>
impl<'a, C: Connection> Driver<'a, C>
pub fn new(scenario: &'a Connection, connection: C) -> Self
pub async fn run<T: Trace, Ch: Checkpoints, Ti: Timer>( self, trace: &mut T, checkpoints: &mut Ch, timer: &mut Ti ) -> Result<C>
pub fn poll_with_timer<T: Trace, Ch: Checkpoints, Ti: Timer>( &mut self, trace: &mut T, checkpoints: &mut Ch, timer: &mut Ti, cx: &mut Context<'_> ) -> Poll<Result<()>>
pub fn poll<T: Trace, Ch: Checkpoints>( &mut self, trace: &mut T, checkpoints: &mut Ch, now: Timestamp, cx: &mut Context<'_> ) -> Poll<Result<()>>
Trait Implementations§
source§impl<'a, C: Connection> Connection for Driver<'a, C>
impl<'a, C: Connection> Connection for Driver<'a, C>
source§impl<'a, C: Connection> Provider for Driver<'a, C>
impl<'a, C: Connection> Provider for Driver<'a, C>
source§fn timers<Q: Query>(&self, query: &mut Q) -> Result
fn timers<Q: Query>(&self, query: &mut Q) -> Result
Notifies the query of any timers owned by the provider Read more
source§fn next_expiration(&self) -> Option<Timestamp>
fn next_expiration(&self) -> Option<Timestamp>
Returns the next
Timestamp
at which the earliest timer is armed in the providersource§fn armed_timer_count(&self) -> usize
fn armed_timer_count(&self) -> usize
Counts the number of armed timers in the provider
source§fn for_each_timer<F>(&self, f: F)
fn for_each_timer<F>(&self, f: F)
Iterates over each timer in the provider and calls the provided function
Auto Trait Implementations§
impl<'a, C> RefUnwindSafe for Driver<'a, C>where
C: RefUnwindSafe,
impl<'a, C> Send for Driver<'a, C>where
C: Send,
impl<'a, C> Sync for Driver<'a, C>where
C: Sync,
impl<'a, C> Unpin for Driver<'a, C>where
C: Unpin,
impl<'a, C> UnwindSafe for Driver<'a, C>where
C: UnwindSafe,
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