Trait WebResourceProvider

Source
pub trait WebResourceProvider: Send + Sync {
    // Required methods
    fn id(&self) -> Uuid;
    fn get_context_path(&self) -> String;
    fn handle_web_resource<'life0, 'async_trait>(
        &'life0 self,
        path: String,
        request: Request<HttpBody>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<HttpBody>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn id(&self) -> Uuid

Source

fn get_context_path(&self) -> String

The context path segment.

Source

fn handle_web_resource<'life0, 'async_trait>( &'life0 self, path: String, request: Request<HttpBody>, ) -> Pin<Box<dyn Future<Output = Result<Response<HttpBody>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handles a web resource.

Trait Implementations§

Source§

impl Injectable for dyn WebResourceProvider + Sync + Send

Implementors§