pub trait Mode<'d, Q = (), O = ()>: Sized {
type Event;
type Held;
type Work: Copy;
type Pending<'p>
where 'd: 'p;
// Required methods
fn replay<'p>(
&mut self,
work: Self::Work,
pending: &mut Self::Pending<'p>,
) -> ControlFlow<Self::Held>
where 'd: 'p;
fn emit<'p>(
&mut self,
event: Occupied<'_, Self::Event>,
work: Self::Work,
pending: &mut Self::Pending<'p>,
) -> ControlFlow<Self::Held>
where 'd: 'p;
fn park(&mut self);
fn observed(observer: &O) -> ControlFlow<()>;
}Expand description
Runs the active application’s phase after each native loan has ended.
Required Associated Types§
Required Methods§
fn replay<'p>(
&mut self,
work: Self::Work,
pending: &mut Self::Pending<'p>,
) -> ControlFlow<Self::Held>where
'd: 'p,
fn emit<'p>(
&mut self,
event: Occupied<'_, Self::Event>,
work: Self::Work,
pending: &mut Self::Pending<'p>,
) -> ControlFlow<Self::Held>where
'd: 'p,
fn park(&mut self)
fn observed(observer: &O) -> ControlFlow<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".