pub struct ShutdownHandle { /* private fields */ }Expand description
A lightweight handle that can be used to shut down a running TalkStack
from another task without holding the full stack.
Implementations§
Source§impl ShutdownHandle
impl ShutdownHandle
Sourcepub async fn transport_closed(&self)
pub async fn transport_closed(&self)
Wait until the transport layer shuts down (e.g. serial device disconnected). Useful for detecting when the stack is no longer viable.
Sourcepub async fn graceful_shutdown(&self)
pub async fn graceful_shutdown(&self)
Close sessions gracefully (e.g. send ASP CloseSess), then stop the transport once all services confirm they are done, or after 5 seconds.
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