pub struct Unit<B> { /* private fields */ }Expand description
A resource with no methods.
Attempting to route to this resource will result in a 404 response.
Implementations§
Trait Implementations§
Source§impl<B> Resource for Unit<B>where
B: BufStream,
impl<B> Resource for Unit<B>where
B: BufStream,
Source§type Destination = ()
type Destination = ()
Token mapping a route to a resource method.
Source§type RequestBody = B
type RequestBody = B
The HTTP request body type.
Source§type Buf = <<Unit<B> as Resource>::Body as BufStream>::Item
type Buf = <<Unit<B> as Resource>::Body as BufStream>::Item
Buffer type yielded by the response body.
Source§fn dispatch(
&mut self,
_: (),
_: &RouteMatch<'_>,
_: Self::RequestBody,
) -> Self::Future
fn dispatch( &mut self, _: (), _: &RouteMatch<'_>, _: Self::RequestBody, ) -> Self::Future
Process the HTTP request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<B> Freeze for Unit<B>
impl<B> RefUnwindSafe for Unit<B>where
B: RefUnwindSafe,
impl<B> Send for Unit<B>where
B: Send,
impl<B> Sync for Unit<B>where
B: Sync,
impl<B> Unpin for Unit<B>where
B: Unpin,
impl<B> UnwindSafe for Unit<B>where
B: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more