pub struct LingerClose<'a, S: HalfClose> { /* private fields */ }Expand description
Future for linger_close. It borrows the stream and caller-retained scratch,
allocates nothing, and waits only on the stream’s own read and one executor
timer, so an idle peer costs no turns before the deadline.
Implementations§
Source§impl<S: HalfClose> LingerClose<'_, S>
impl<S: HalfClose> LingerClose<'_, S>
Sourcepub fn set_deadline(&mut self, deadline: Option<Instant>)
pub fn set_deadline(&mut self, deadline: Option<Instant>)
Move the deadline, for example to honour an earlier server shutdown deadline. The timer is re-armed on the next poll only if it changed.
Trait Implementations§
Source§impl<S: HalfClose> Future for LingerClose<'_, S>
impl<S: HalfClose> Future for LingerClose<'_, S>
Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for LingerClose<'a, S>
impl<'a, S> !Send for LingerClose<'a, S>
impl<'a, S> !Sync for LingerClose<'a, S>
impl<'a, S> !UnwindSafe for LingerClose<'a, S>
impl<'a, S> Forget for LingerClose<'a, S>
impl<'a, S> Freeze for LingerClose<'a, S>
impl<'a, S> Unpin for LingerClose<'a, S>
impl<'a, S> UnsafeUnpin for LingerClose<'a, S>where
&'a mut S: UnsafeUnpin,
Option<ExecutorHandle<<S as HalfClose>::Backend>>: UnsafeUnpin,
Option<(Instant, Sleep<<S as HalfClose>::Backend>)>: UnsafeUnpin,
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
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more