Struct embedded_svc::httpd::Middleware
source · [−]pub struct Middleware { /* private fields */ }
Implementations
sourceimpl Middleware
impl Middleware
pub fn new(
uri: impl ToString,
handler: impl for<'r> Fn(Request, &'r dyn Fn(Request) -> Result<Response>) -> Result<Response> + 'static
) -> Self
pub fn uri(&self) -> &impl AsRef<str>
pub fn handler(
self
) -> Box<dyn for<'r> Fn(Request, &'r dyn Fn(Request) -> Result<Response>) -> Result<Response>>
Auto Trait Implementations
impl !RefUnwindSafe for Middleware
impl !Send for Middleware
impl !Sync for Middleware
impl Unpin for Middleware
impl !UnwindSafe for Middleware
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more