pub struct Session { /* private fields */ }Expand description
Lifecycle of a single connection. It owns no buffers or operating-system resources.
Implementations§
Source§impl Session
impl Session
Sourcepub fn deadline(&self) -> Option<Duration>
pub fn deadline(&self) -> Option<Duration>
The next absolute deadline on the caller’s monotonic clock.
Sourcepub fn start(&mut self, now: Duration) -> Option<Action>
pub fn start(&mut self, now: Duration) -> Option<Action>
Start an idle lifecycle with a fresh retry budget.
Sourcepub fn connected(&mut self, generation: u64, now: Duration) -> Option<Action>
pub fn connected(&mut self, generation: u64, now: Duration) -> Option<Action>
Report a verified, authorized handshake. A callback at the deadline is late.
Sourcepub fn failed(
&mut self,
generation: u64,
now: Duration,
retryable: bool,
) -> Option<Action>
pub fn failed( &mut self, generation: u64, now: Duration, retryable: bool, ) -> Option<Action>
Report a failure. Only transient failures consume a retry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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