[][src]Crate tide_naive_static_files

Code heavily based on https://github.com/http-rs/tide/blob/4aec5fe2bb6b8202f7ae48e416eeb37345cf029f/backup/examples/staticfile.rs

Structs

StaticFilesEndpoint

A struct that holds a path to your app's static assets directory. This struct implements tide::Endpoint so it can be passed directly to tide::Route::get.

Traits

StaticRootDir

A trait that provides a way to get a &Path to your static assets directory from your tide app's state. Meant to be used with the serve_static_files function.

Functions

serve_static_files

Use in a tide tide::Route::get handler to serve static files from an endpoint. In order to use this function, your tide app's state must implement the StaticRootDir trait.