Struct lair_keystore_api::internal::util::KillSwitch [−][src]
pub struct KillSwitch { /* fields omitted */ }
Expand description
If any clones of this struct are dropped,
they all say we should stop looping.
You can mix
in a future that will abort
if the kill switch is triggered.
Implementations
Get a “Weak” version of this kill_switch that will allow mixing/checking the kill status, but will not kill other instances when dropped.
Convert this kill_switch to a “Weak” version that will not kill other insances when dropped.
Register an async callback that will be invoked on kill.
Mix in another future so it will abort if this kill switch is triggered.
pub fn mix_static<R, F>(
&self,
f: F
) -> impl Future<Output = LairResult<R>> + 'static where
F: 'static + Future<Output = LairResult<R>>,
pub fn mix_static<R, F>(
&self,
f: F
) -> impl Future<Output = LairResult<R>> + 'static where
F: 'static + Future<Output = LairResult<R>>,
Mix in another future so it will abort if this kill switch is triggered. Sometimes we need static futures.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for KillSwitch
impl Send for KillSwitch
impl Sync for KillSwitch
impl Unpin for KillSwitch
impl !UnwindSafe for KillSwitch
Blanket Implementations
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more