pub struct StaticFileOwned { /* private fields */ }
Available on crate feature
fs
only.Expand description
Static get handler which servers/returns a file.
§Example
use fire::fs::StaticFileOwned;
#[tokio::main]
async fn main() {
let mut server = fire::build("127.0.0.1:0").await.unwrap();
server.add_route(
StaticFileOwned::new("/files/file".into(), "./www/file".into())
);
}
Implementations§
Trait Implementations§
Source§impl Clone for StaticFileOwned
impl Clone for StaticFileOwned
Source§fn clone(&self) -> StaticFileOwned
fn clone(&self) -> StaticFileOwned
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 StaticFileOwned
impl Debug for StaticFileOwned
Source§impl IntoRoute for StaticFileOwned
impl IntoRoute for StaticFileOwned
Source§impl PartialEq for StaticFileOwned
impl PartialEq for StaticFileOwned
impl Eq for StaticFileOwned
impl StructuralPartialEq for StaticFileOwned
Auto Trait Implementations§
impl Freeze for StaticFileOwned
impl RefUnwindSafe for StaticFileOwned
impl Send for StaticFileOwned
impl Sync for StaticFileOwned
impl Unpin for StaticFileOwned
impl UnwindSafe for StaticFileOwned
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.