Struct rocket_static_fs::StaticFileServer[][src]

pub struct StaticFileServer<T> where
    T: FileSystem + Sized + Send + Sync
{ /* fields omitted */ }

StaticFileServer is your fairing for the static file server.

Methods

impl<T> StaticFileServer<T> where
    T: FileSystem + Sized + Send + Sync
[src]

Constructs a new StaticFileServer fairing.

path is local directory to serve from. prefix is the prefix the serve from.

You can set a prefix of /assets and only requests to /assets/* will be served.

Trait Implementations

impl<T: 'static> Fairing for StaticFileServer<T> where
    T: FileSystem + Sized + Send + Sync
[src]

Returns an Info structure containing the name and Kind of this fairing. The name can be any arbitrary string. Kind must be an ord set of Kind variants. Read more

The response callback. Read more

The attach callback. Returns Ok if launch should proceed and Err if launch should be aborted. Read more

The launch callback. Read more

The request callback. Read more

Auto Trait Implementations

impl<T> Send for StaticFileServer<T>

impl<T> Sync for StaticFileServer<T>