Struct relm4::shutdown::AttachedShutdown
source · pub struct AttachedShutdown<F> { /* private fields */ }
Expand description
A future attached to a shutdown receiver.
Implementations§
source§impl<F, Out> AttachedShutdown<F>where
F: Future<Output = Out>,
impl<F, Out> AttachedShutdown<F>where
F: Future<Output = Out>,
sourcepub async fn on_shutdown<S>(self, shutdown: S) -> Outwhere
S: Future<Output = Out>,
pub async fn on_shutdown<S>(self, shutdown: S) -> Outwhere
S: Future<Output = Out>,
Creates a future which will resolve to this on shutdown.
sourcepub async fn wait(self) -> Either<(), Out>
pub async fn wait(self) -> Either<(), Out>
Waits until a shutdown signal is received.
Either::Left(())
on cancellation.Either::Right(Out)
on registered future completion.
sourcepub async fn drop_on_shutdown(self)
pub async fn drop_on_shutdown(self)
Waits until a shutdown signal is received.
Ignores any output when we don’t care about it.