pub struct Valid<T>(pub T);Expand description
Extract-then-validate: Valid(Json(todo)): Valid<Json<NewTodo>>.
Violations become 422 JC0422 with a structured details array.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T> FromRequest for Valid<T>where
T: FromRequest + Validate,
impl<T> FromRequest for Valid<T>where
T: FromRequest + Validate,
async fn from_request(ctx: &mut RequestCtx) -> Result<Self>
Auto Trait Implementations§
impl<T> Freeze for Valid<T>where
T: Freeze,
impl<T> RefUnwindSafe for Valid<T>where
T: RefUnwindSafe,
impl<T> Send for Valid<T>where
T: Send,
impl<T> Sync for Valid<T>where
T: Sync,
impl<T> Unpin for Valid<T>where
T: Unpin,
impl<T> UnsafeUnpin for Valid<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Valid<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