Skip to main content

Extension

Trait Extension 

Source
pub trait Extension {
    // Required method
    fn extend<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        request: &'life1 (dyn Request + Sync),
    ) -> Pin<Box<dyn Future<Output = Result<Extensions, ()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A system of addons provided additional data.

An endpoint not having any extension may use &mut () as the result of system.

Required Methods§

Source

fn extend<'life0, 'life1, 'async_trait>( &'life0 mut self, request: &'life1 (dyn Request + Sync), ) -> Pin<Box<dyn Future<Output = Result<Extensions, ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Inspect the request to produce extension data.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Extension for ()

Source§

fn extend<'life0, 'life1, 'async_trait>( &'life0 mut self, _: &'life1 (dyn Request + Sync), ) -> Pin<Box<dyn Future<Output = Result<Extensions, ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl Extension for AddonList

Source§

fn extend<'life0, 'life1, 'async_trait>( &'life0 mut self, request: &'life1 (dyn Request + Sync), ) -> Pin<Box<dyn Future<Output = Result<Extensions, ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§