Struct fire_http::fs::StaticFilesOwned
source · pub struct StaticFilesOwned { /* private fields */ }
Available on crate feature
fs
only.Expand description
Static get handler which servers files from a directory.
Example
use fire::fs::StaticFilesOwned;
#[tokio::main]
async fn main() {
let mut server = fire::build("127.0.0.1:0").await.unwrap();
server.add_route(
StaticFilesOwned::new("/files".into(), "./www/".into())
);
}
Implementations§
Trait Implementations§
source§impl Clone for StaticFilesOwned
impl Clone for StaticFilesOwned
source§fn clone(&self) -> StaticFilesOwned
fn clone(&self) -> StaticFilesOwned
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 StaticFilesOwned
impl Debug for StaticFilesOwned
source§impl IntoRoute for StaticFilesOwned
impl IntoRoute for StaticFilesOwned
type IntoRoute = StaticFilesRoute
fn into_route(self) -> StaticFilesRoute
source§impl PartialEq for StaticFilesOwned
impl PartialEq for StaticFilesOwned
source§fn eq(&self, other: &StaticFilesOwned) -> bool
fn eq(&self, other: &StaticFilesOwned) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StaticFilesOwned
impl StructuralEq for StaticFilesOwned
impl StructuralPartialEq for StaticFilesOwned
Auto Trait Implementations§
impl RefUnwindSafe for StaticFilesOwned
impl Send for StaticFilesOwned
impl Sync for StaticFilesOwned
impl Unpin for StaticFilesOwned
impl UnwindSafe for StaticFilesOwned
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.