Skip to main content

Route

Trait Route 

Source
pub trait Route {
    // Required methods
    fn model<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 (impl 'async_trait + Context),
        params: &'life2 Path<RouteDef>,
    ) -> Pin<Box<dyn Future<Output = Result<Document>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn name(&self) -> &'static str;
}

Required Methods§

Source

fn model<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 (impl 'async_trait + Context), params: &'life2 Path<RouteDef>, ) -> Pin<Box<dyn Future<Output = Result<Document>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§