pub struct MapErr<W, F, T>(/* private fields */);Expand description
Changes the error type of a web request and response.
Implementations§
Source§impl<W, F, T> MapErr<W, F, T>
impl<W, F, T> MapErr<W, F, T>
Trait Implementations§
Source§impl<W: WebRequest, F, T> WebRequest for MapErr<W, F, T>
impl<W: WebRequest, F, T> WebRequest for MapErr<W, F, T>
Source§type Response = MapErr<<W as WebRequest>::Response, F, T>
type Response = MapErr<<W as WebRequest>::Response, F, T>
The corresponding type of Responses returned from this module.
Source§fn query(
&mut self,
) -> Result<Cow<'_, dyn QueryParameter + 'static>, Self::Error>
fn query( &mut self, ) -> Result<Cow<'_, dyn QueryParameter + 'static>, Self::Error>
Retrieve a parsed version of the url query. Read more
Source§impl<W: WebResponse, F, T> WebResponse for MapErr<W, F, T>
impl<W: WebResponse, F, T> WebResponse for MapErr<W, F, T>
Source§fn redirect(&mut self, url: Url) -> Result<(), Self::Error>
fn redirect(&mut self, url: Url) -> Result<(), Self::Error>
A response which will redirect the user-agent to which the response is issued.
Set the response status to 401 and add a WWW-Authenticate header.
Source§fn body_text(&mut self, text: &str) -> Result<(), Self::Error>
fn body_text(&mut self, text: &str) -> Result<(), Self::Error>
A pure text response with no special media type set.
Auto Trait Implementations§
impl<W, F, T> Freeze for MapErr<W, F, T>
impl<W, F, T> RefUnwindSafe for MapErr<W, F, T>
impl<W, F, T> Send for MapErr<W, F, T>
impl<W, F, T> Sync for MapErr<W, F, T>
impl<W, F, T> Unpin for MapErr<W, F, T>
impl<W, F, T> UnwindSafe for MapErr<W, F, T>
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