Struct event_stream_types::TolerantJson
source · pub struct TolerantJson<T>(pub T);
Expand description
This is much like axum::Json
but does not fail if the request does not set
the ‘Content-Type’ header.
This is purely for backwards-compatibility and can be removed sometime.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T, S> FromRequest<S> for TolerantJson<T>
impl<T, S> FromRequest<S> for TolerantJson<T>
§type Rejection = JsonRejection
type Rejection = JsonRejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Auto Trait Implementations§
impl<T> Freeze for TolerantJson<T>where
T: Freeze,
impl<T> RefUnwindSafe for TolerantJson<T>where
T: RefUnwindSafe,
impl<T> Send for TolerantJson<T>where
T: Send,
impl<T> Sync for TolerantJson<T>where
T: Sync,
impl<T> Unpin for TolerantJson<T>where
T: Unpin,
impl<T> UnwindSafe for TolerantJson<T>where
T: 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