pub trait DispatcherInterruptExt {
// Required methods
fn on_interrupt<K: InterruptKind, T: Timeline>(
&self,
interrupt: Interrupt<K, T>,
) -> OnInterrupt<K, T>;
fn try_on_interrupt<K: InterruptKind, T: Timeline>(
&self,
interrupt: Interrupt<K, T>,
) -> Option<OnInterrupt<K, T>>;
}Expand description
Extension trait adding interrupt listening capabilities to types providing an async dispatcher.
Required Methods§
Sourcefn on_interrupt<K: InterruptKind, T: Timeline>(
&self,
interrupt: Interrupt<K, T>,
) -> OnInterrupt<K, T>
fn on_interrupt<K: InterruptKind, T: Timeline>( &self, interrupt: Interrupt<K, T>, ) -> OnInterrupt<K, T>
Returns an OnInterrupt stream bound to this dispatcher.
Sourcefn try_on_interrupt<K: InterruptKind, T: Timeline>(
&self,
interrupt: Interrupt<K, T>,
) -> Option<OnInterrupt<K, T>>
fn try_on_interrupt<K: InterruptKind, T: Timeline>( &self, interrupt: Interrupt<K, T>, ) -> Option<OnInterrupt<K, T>>
Returns an OnInterrupt stream bound to this dispatcher, or None if no dispatcher is present.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".