pub struct Driver { /* private fields */ }Expand description
Drives a session with caller-supplied time.
Returned by crate::Client::connect and crate::Server::accept. Call
poll when external activity wakes the waiter or when the
returned deadline is reached, supplying nondecreasing instants; see
crate::time::Driver for the contract. Completion is cached, so
subsequent polls return the same error.
It holds no session handle: dropping the last crate::Session requests
closure on the next poll. Dropping the driver cancels the session, and
crate::Session::closed resolves with Error::Cancel. It is Send on
native, like the Boxable transport it drives, and never Sync.
A panic during polling is published as a transport failure before unwinding to the caller.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Driver
impl !RefUnwindSafe for Driver
impl !Sync for Driver
impl !UnwindSafe for Driver
impl Unpin for Driver
impl UnsafeUnpin for Driver
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