Struct s2n_netbench::client::Driver
source · pub struct Driver<'a, C: Client<'a>> { /* private fields */ }
Implementations§
source§impl<'a, C: Client<'a>> Driver<'a, C>
impl<'a, C: Client<'a>> Driver<'a, C>
pub fn new(client: C, scenario: &'a Client, addresses: &'a AddressMap) -> 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: Client<'a>> Provider for Driver<'a, C>
impl<'a, C: Client<'a>> Provider for Driver<'a, C>
source§fn timers<Q>(&self, query: &mut Q) -> Resultwhere
Q: Query,
fn timers<Q>(&self, query: &mut Q) -> Resultwhere
Q: Query,
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,
<C as Client<'a>>::Connect: RefUnwindSafe,
<C as Client<'a>>::Connection: RefUnwindSafe,
impl<'a, C> Send for Driver<'a, C>
impl<'a, C> Sync for Driver<'a, C>
impl<'a, C> Unpin for Driver<'a, C>
impl<'a, C> UnwindSafe for Driver<'a, C>where
C: UnwindSafe,
<C as Client<'a>>::Connect: UnwindSafe,
<C as Client<'a>>::Connection: 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