pub struct ShutdownHandle { /* private fields */ }Expand description
Shared shutdown flag.
Implementations§
Source§impl ShutdownHandle
impl ShutdownHandle
Sourcepub fn trigger(&self)
pub fn trigger(&self)
Trigger shutdown programmatically.
Sets the flag, wakes the registered task waker (if any), and breaks epoll_wait so the runtime loop re-polls the root future.
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Check if shutdown has been requested.
Sourcepub fn signal(&self) -> ShutdownSignal ⓘ
pub fn signal(&self) -> ShutdownSignal ⓘ
Returns a future that completes when shutdown is triggered.
Trait Implementations§
Source§impl Clone for ShutdownHandle
impl Clone for ShutdownHandle
Source§fn clone(&self) -> ShutdownHandle
fn clone(&self) -> ShutdownHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShutdownHandle
impl RefUnwindSafe for ShutdownHandle
impl Send for ShutdownHandle
impl Sync for ShutdownHandle
impl Unpin for ShutdownHandle
impl UnsafeUnpin for ShutdownHandle
impl UnwindSafe for ShutdownHandle
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