Trait Answer

Source
pub trait Answer:
    Send
    + Sync
    + DynClone {
    // Required method
    fn answer<'life0, 'async_trait>(
        &'life0 self,
        query: Query<Retrieved>,
    ) -> Pin<Box<dyn Future<Output = Result<Query<Answered>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn name(&self) -> &'static str { ... }
}
Expand description

Can answer the original query

Required Methods§

Source

fn answer<'life0, 'async_trait>( &'life0 self, query: Query<Retrieved>, ) -> Pin<Box<dyn Future<Output = Result<Query<Answered>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn name(&self) -> &'static str

Trait Implementations§

Source§

impl Answer for Box<dyn Answer>

Source§

fn answer<'life0, 'async_trait>( &'life0 self, query: Query<Retrieved>, ) -> Pin<Box<dyn Future<Output = Result<Query<Answered>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn name(&self) -> &'static str

Implementations on Foreign Types§

Source§

impl Answer for Box<dyn Answer>

Source§

fn answer<'life0, 'async_trait>( &'life0 self, query: Query<Retrieved>, ) -> Pin<Box<dyn Future<Output = Result<Query<Answered>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn name(&self) -> &'static str

Implementors§