[−][src]Struct gotham::handler::assets::DirHandler
Represents a handler for any files under a directory.
Methods
impl DirHandler
[src]
pub fn new<P>(path: P) -> DirHandler where
FileOptions: From<P>,
[src]
FileOptions: From<P>,
Create a new DirHandler
with the given root path.
Trait Implementations
impl Handler for DirHandler
[src]
fn handle(self, state: State) -> Box<HandlerFuture>
[src]
impl NewHandler for DirHandler
[src]
type Instance = Self
The type of Handler
created by the NewHandler
.
fn new_handler(&self) -> Result<Self::Instance>
[src]
impl Clone for DirHandler
[src]
fn clone(&self) -> DirHandler
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Unpin for DirHandler
impl Sync for DirHandler
impl Send for DirHandler
impl RefUnwindSafe for DirHandler
impl UnwindSafe for DirHandler
Blanket Implementations
impl<F, R> Handler for F where
F: FnOnce(State) -> R + Send,
R: IntoHandlerFuture,
[src]
F: FnOnce(State) -> R + Send,
R: IntoHandlerFuture,
fn handle(
Self,
State
) -> Box<dyn Future<Item = (State, Response<Body>), Error = (State, HandlerError)> + 'static + Send>
[src]
Self,
State
) -> Box<dyn Future<Item = (State, Response<Body>), Error = (State, HandlerError)> + 'static + Send>
impl<F, H> NewHandler for F where
F: Fn() -> Result<H, Error> + Send + Sync + RefUnwindSafe,
H: Handler + Send,
[src]
F: Fn() -> Result<H, Error> + Send + Sync + RefUnwindSafe,
H: Handler + Send,
type Instance = H
The type of Handler
created by the NewHandler
.
fn new_handler(&Self) -> Result<H, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,