pub enum ValidationError {
ValidationError(ValidationErrors),
FormRejection(FormRejection),
JsonRejection(JsonRejection),
QueryRejection(QueryRejection),
}
Expand description
Error type for validated extractors
Variants§
ValidationError(ValidationErrors)
Error variant for validation errors
FormRejection(FormRejection)
Error variant for form rejection errors
JsonRejection(JsonRejection)
Error variant for JSON rejection errors
QueryRejection(QueryRejection)
Error variant for query rejection errors
Trait Implementations§
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<FormRejection> for ValidationError
impl From<FormRejection> for ValidationError
Source§fn from(source: FormRejection) -> Self
fn from(source: FormRejection) -> Self
Converts to this type from the input type.
Source§impl From<JsonRejection> for ValidationError
impl From<JsonRejection> for ValidationError
Source§fn from(source: JsonRejection) -> Self
fn from(source: JsonRejection) -> Self
Converts to this type from the input type.
Source§impl From<QueryRejection> for ValidationError
impl From<QueryRejection> for ValidationError
Source§fn from(source: QueryRejection) -> Self
fn from(source: QueryRejection) -> Self
Converts to this type from the input type.
Source§impl From<ValidationErrors> for ValidationError
impl From<ValidationErrors> for ValidationError
Source§fn from(source: ValidationErrors) -> Self
fn from(source: ValidationErrors) -> Self
Converts to this type from the input type.
Source§impl IntoResponse for ValidationError
impl IntoResponse for ValidationError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for ValidationError
impl !RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl !UnwindSafe for ValidationError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP