pub struct ValidatedJson<T>(pub T);Expand description
JSON extractor that runs validator automatically.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T> Deref for ValidatedJson<T>
impl<T> Deref for ValidatedJson<T>
Source§impl<T, S> FromRequest<S> for ValidatedJson<T>
impl<T, S> FromRequest<S> for ValidatedJson<T>
Source§type Rejection = ValidationError
type Rejection = ValidationError
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 ValidatedJson<T>where
T: Freeze,
impl<T> RefUnwindSafe for ValidatedJson<T>where
T: RefUnwindSafe,
impl<T> Send for ValidatedJson<T>where
T: Send,
impl<T> Sync for ValidatedJson<T>where
T: Sync,
impl<T> Unpin for ValidatedJson<T>where
T: Unpin,
impl<T> UnsafeUnpin for ValidatedJson<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ValidatedJson<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