Trait FutureNotion

Source
pub trait FutureNotion {
    type Input: 'static;
    type Output: 'static;

    // Required method
    fn run<'a>(
        states: &'a BounceStates,
        input: &'a Self::Input,
    ) -> LocalBoxFuture<'a, Self::Output>;
}
Expand description

A trait to implement a Future-backed notion.

This trait is usually automatically implemented by the #[future_notion] attribute macro.

Required Associated Types§

Source

type Input: 'static

The input type.

Source

type Output: 'static

The output type.

Required Methods§

Source

fn run<'a>( states: &'a BounceStates, input: &'a Self::Input, ) -> LocalBoxFuture<'a, Self::Output>

Runs a future notion.

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§