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
Source§impl PartialEq for StaticFilesOwned
impl PartialEq for StaticFilesOwned
impl Eq for StaticFilesOwned
impl StructuralPartialEq for StaticFilesOwned
Auto Trait Implementations§
impl Freeze for StaticFilesOwned
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.