pub enum NotFoundStrategy {
Plain,
File(PathBuf),
}Expand description
What to serve when a requested file isn’t found.
Variants§
Plain
Return a text/plain; charset=utf-8 404. The default.
File(PathBuf)
Serve <root>/<file> as the 404 body (typically 404.html).
Falls back to NotFoundStrategy::Plain if the file can’t be
read. Livereload script is injected when the file is HTML.
Trait Implementations§
Source§impl Clone for NotFoundStrategy
impl Clone for NotFoundStrategy
Source§fn clone(&self) -> NotFoundStrategy
fn clone(&self) -> NotFoundStrategy
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 NotFoundStrategy
impl RefUnwindSafe for NotFoundStrategy
impl Send for NotFoundStrategy
impl Sync for NotFoundStrategy
impl Unpin for NotFoundStrategy
impl UnsafeUnpin for NotFoundStrategy
impl UnwindSafe for NotFoundStrategy
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