pub struct StaticServeConfig {
pub root: PathBuf,
pub base_path: String,
pub livereload: LiveReload,
pub not_found: NotFoundStrategy,
}Expand description
Configuration for serve_static_file. Cheap to clone — paths are
shared across requests.
Fields§
§root: PathBufDirectory from which files are served.
base_path: StringApplication basePath. Use "/" when the app is hosted at root.
Must be normalized via
normalize_base_path.
livereload: LiveReloadLive-reload broadcaster — its client script is injected into
every HTML response served. Pass [LiveReload::disabled] (or
any newly-constructed instance) to skip injection.
not_found: NotFoundStrategyWhat to serve on miss.
Trait Implementations§
Source§impl Clone for StaticServeConfig
impl Clone for StaticServeConfig
Source§fn clone(&self) -> StaticServeConfig
fn clone(&self) -> StaticServeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StaticServeConfig
impl !RefUnwindSafe for StaticServeConfig
impl Send for StaticServeConfig
impl Sync for StaticServeConfig
impl Unpin for StaticServeConfig
impl UnsafeUnpin for StaticServeConfig
impl !UnwindSafe for StaticServeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more