pub struct Validated<V, E> { /* private fields */ }Expand description
An endpoint with compile-time validated request bodies.
V implements Validate<Req> where Req is the endpoint’s body type.
The framework validates the body after deserialization and returns 422
if validation fails, before the handler is called.
Trait Implementations§
Source§impl<V: Send + Sync + 'static, E: BindableEndpoint> BindableEndpoint for Validated<V, E>
impl<V: Send + Sync + 'static, E: BindableEndpoint> BindableEndpoint for Validated<V, E>
impl<V: Send + Sync + 'static, E, Provided, Idx> AllProvided<Provided, Idx> for Validated<V, E>where
E: AllProvided<Provided, Idx>,
impl<V: Send + Sync + 'static, E: ApiSpec> ApiSpec for Validated<V, E>
Auto Trait Implementations§
impl<V, E> Freeze for Validated<V, E>
impl<V, E> RefUnwindSafe for Validated<V, E>where
V: RefUnwindSafe,
E: RefUnwindSafe,
impl<V, E> Send for Validated<V, E>
impl<V, E> Sync for Validated<V, E>
impl<V, E> Unpin for Validated<V, E>
impl<V, E> UnsafeUnpin for Validated<V, E>
impl<V, E> UnwindSafe for Validated<V, E>where
V: UnwindSafe,
E: 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