pub struct FnHttpService<F>(/* private fields */);
Expand description
A HttpService
that is created from a function.
The given function will be called for each incoming request.
This is useful for creating simple services without needing to implement the HttpService
trait.
Create by calling fn_http_service
.
Trait Implementations§
Source§impl<F: Clone> Clone for FnHttpService<F>
impl<F: Clone> Clone for FnHttpService<F>
Source§fn clone(&self) -> FnHttpService<F>
fn clone(&self) -> FnHttpService<F>
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<F> Debug for FnHttpService<F>
impl<F> Debug for FnHttpService<F>
Source§impl<F, Fut, E, B> HttpService for FnHttpService<F>
impl<F, Fut, E, B> HttpService for FnHttpService<F>
Auto Trait Implementations§
impl<F> Freeze for FnHttpService<F>where
F: Freeze,
impl<F> RefUnwindSafe for FnHttpService<F>where
F: RefUnwindSafe,
impl<F> Send for FnHttpService<F>where
F: Send,
impl<F> Sync for FnHttpService<F>where
F: Sync,
impl<F> Unpin for FnHttpService<F>where
F: Unpin,
impl<F> UnwindSafe for FnHttpService<F>where
F: UnwindSafe,
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