Struct fire_http::fs::StaticFile
source · pub struct StaticFile { /* private fields */ }
Available on crate feature
fs
only.Expand description
Static get handler which servers/returns a file.
Example
use fire::fs::StaticFile;
const INDEX: StaticFile = StaticFile::new("/", "./www/index.html");
Implementations§
source§impl StaticFile
impl StaticFile
Trait Implementations§
source§impl Clone for StaticFile
impl Clone for StaticFile
source§fn clone(&self) -> StaticFile
fn clone(&self) -> StaticFile
Returns a copy 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 moresource§impl Debug for StaticFile
impl Debug for StaticFile
source§impl IntoRoute for StaticFile
impl IntoRoute for StaticFile
type IntoRoute = StaticFileRoute
fn into_route(self) -> StaticFileRoute
source§impl PartialEq for StaticFile
impl PartialEq for StaticFile
source§fn eq(&self, other: &StaticFile) -> bool
fn eq(&self, other: &StaticFile) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for StaticFile
impl Eq for StaticFile
impl StructuralEq for StaticFile
impl StructuralPartialEq for StaticFile
Auto Trait Implementations§
impl RefUnwindSafe for StaticFile
impl Send for StaticFile
impl Sync for StaticFile
impl Unpin for StaticFile
impl UnwindSafe for StaticFile
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.