FrontendEffect

Trait FrontendEffect 

Source
pub trait FrontendEffect<Frntend, Bkend, Md> {
    // Required method
    fn apply(
        self,
        target: &mut Frntend,
    ) -> impl Into<AsyncTask<Frntend, Bkend, Md>>;
}
Expand description

Represents a mutation that can be applied to some state, returning an effect.

Required Methods§

Source

fn apply(self, target: &mut Frntend) -> impl Into<AsyncTask<Frntend, Bkend, Md>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<M, Frntend, Bkend, Md> FrontendEffect<Frntend, Bkend, Md> for Option<M>
where M: FrontendEffect<Frntend, Bkend, Md>,

Source§

fn apply(self, target: &mut Frntend) -> impl Into<AsyncTask<Frntend, Bkend, Md>>

Implementors§

Source§

impl<F, T, Frntend, Bkend, Md> FrontendEffect<Frntend, Bkend, Md> for F
where F: FnOnce(&mut Frntend) -> T, T: Into<AsyncTask<Frntend, Bkend, Md>>,

Allow closures to be accepted as TaskHandlers if equality and debug features are not required.