ActionCallback

Trait ActionCallback 

Source
pub trait ActionCallback<M, E> {
    type Input;
    type Output;

    // Required method
    fn call(
        &mut self,
        input: Self::Input,
    ) -> impl Future<Output = Result<Self::Output, E>> + 'static;
}

Required Associated Types§

Required Methods§

Source

fn call( &mut self, input: Self::Input, ) -> impl Future<Output = Result<Self::Output, E>> + 'static

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.

Implementors§

Source§

impl<F, O, A, G, E> ActionCallback<(A, O), E> for F
where F: FnMut(A) -> G, G: Future<Output = Result<O, E>> + 'static,

Source§

impl<F, O, G, E> ActionCallback<(O,), E> for F
where F: FnMut() -> G, G: Future<Output = Result<O, E>> + 'static,

Source§

impl<O, A, B, C, F, G, E> ActionCallback<(A, B, C, O), E> for F
where F: FnMut(A, B, C) -> G, G: Future<Output = Result<O, E>> + 'static,

Source§

impl<O, A, B, F, G, E> ActionCallback<(A, B, O), E> for F
where F: FnMut(A, B) -> G, G: Future<Output = Result<O, E>> + 'static,