pub struct Watch { /* private fields */ }
Expand description
Watch for a drain command.
All Watch
instances must be dropped for a Signal::signal
call to
complete.
Implementations§
source§impl Watch
impl Watch
sourcepub async fn signaled(self) -> ReleaseShutdown
pub async fn signaled(self) -> ReleaseShutdown
Returns a ReleaseShutdown
handle after the drain has been signaled. The
handle must be dropped when a shutdown action has been completed to
unblock graceful shutdown.
sourcepub fn ignore_signaled(self) -> ReleaseShutdown
pub fn ignore_signaled(self) -> ReleaseShutdown
Return a ReleaseShutdown
handle immediately, ignoring the release signal.
This is intended to allow a task to block shutdown until it completes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Watch
impl !RefUnwindSafe for Watch
impl Send for Watch
impl Sync for Watch
impl Unpin for Watch
impl !UnwindSafe for Watch
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