Skip to main content

Mode

Trait Mode 

Source
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§

Source

type Event

Source

type Held

Source

type Work: Copy

Source

type Pending<'p>
where 'd: 'p,

Required Methods§

Source

fn replay<'p>( &mut self, work: Self::Work, pending: &mut Self::Pending<'p>, ) -> ControlFlow<Self::Held>
where 'd: 'p,

Source

fn emit<'p>( &mut self, event: Occupied<'_, Self::Event>, work: Self::Work, pending: &mut Self::Pending<'p>, ) -> ControlFlow<Self::Held>
where 'd: 'p,

Source

fn park(&mut self)

Source

fn observed(observer: &O) -> ControlFlow<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§