Skip to main content

DirBackendPlugin

Trait DirBackendPlugin 

Source
pub trait DirBackendPlugin:
    Send
    + Sync
    + 'static {
    // Required method
    fn get(
        &self,
        request: &Request<()>,
    ) -> Result<Response<Box<[u8]>>, DirBackendPluginError>;
}
Expand description

An object that knows how to handle one or more kinds of directory requests.

Required Methods§

Source

fn get( &self, request: &Request<()>, ) -> Result<Response<Box<[u8]>>, DirBackendPluginError>

Handle a GET request.

Returns an http Response if the request is recognized, whether it succeeds or fails.

Returns an error if the request type is not recognized, or if an internal error occurs.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§