Struct validr::error::ValidationErrors [−][src]
pub struct ValidationErrors { /* fields omitted */ }
Implementations
impl ValidationErrors
[src]
impl ValidationErrors
[src]pub fn add(&mut self, error: ValidationError)
[src]
pub fn add(&mut self, error: ValidationError)
[src]Add validation error
pub fn has_errors(&self) -> bool
[src]
pub fn has_errors(&self) -> bool
[src]Check if there are any validation errors
pub fn get_error(&self, key: &str) -> Result<ValidationError, String>
[src]
pub fn get_error(&self, key: &str) -> Result<ValidationError, String>
[src]Copy single error from the hash map
pub fn get_errors(&self) -> HashMap<String, ValidationError>
[src]
pub fn get_errors(&self) -> HashMap<String, ValidationError>
[src]Return all the errors
Trait Implementations
impl Clone for ValidationErrors
[src]
impl Clone for ValidationErrors
[src]fn clone(&self) -> ValidationErrors
[src]
fn clone(&self) -> ValidationErrors
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for ValidationErrors
[src]
impl Debug for ValidationErrors
[src]impl Default for ValidationErrors
[src]
impl Default for ValidationErrors
[src]impl Display for ValidationErrors
[src]
impl Display for ValidationErrors
[src]Allow the use of “{}” format specifier
impl Error for ValidationErrors
[src]
impl Error for ValidationErrors
[src]Implement std::error::Error for ValidationErrors
fn cause(&self) -> Option<&dyn StdError>
[src]
fn cause(&self) -> Option<&dyn StdError>
[src]replaced by Error::source, which can support downcasting
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl PartialEq<ValidationErrors> for ValidationErrors
[src]
impl PartialEq<ValidationErrors> for ValidationErrors
[src]fn eq(&self, other: &ValidationErrors) -> bool
[src]
fn eq(&self, other: &ValidationErrors) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &ValidationErrors) -> bool
[src]
fn ne(&self, other: &ValidationErrors) -> bool
[src]This method tests for !=
.
impl Responder for ValidationErrors
[src]
impl Responder for ValidationErrors
[src]Allow the error to be returned into responder for actix right away
type Error = ValidationErrors
type Error = ValidationErrors
The associated error which can be returned.
fn respond_to(self, _: &HttpRequest) -> Self::Future
[src]
fn respond_to(self, _: &HttpRequest) -> Self::Future
[src]Convert itself to AsyncResult
or Error
.
fn with_status(self, status: StatusCode) -> CustomResponder<Self>
[src]
fn with_status(self, status: StatusCode) -> CustomResponder<Self>
[src]Override a status code for a Responder. Read more
fn with_header<K, V>(self, key: K, value: V) -> CustomResponder<Self> where
V: IntoHeaderValue,
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
[src]
fn with_header<K, V>(self, key: K, value: V) -> CustomResponder<Self> where
V: IntoHeaderValue,
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
[src]Add header to the Responder’s response. Read more
impl ResponseError for ValidationErrors
[src]
impl ResponseError for ValidationErrors
[src]Allow the error to be returned in actix as error response
fn error_response(&self) -> HttpResponse
[src]
fn error_response(&self) -> HttpResponse
[src]Create response for error Read more
fn status_code(&self) -> StatusCode
[src]
fn status_code(&self) -> StatusCode
[src]Response’s status code Read more
impl Serialize for ValidationErrors
[src]
impl Serialize for ValidationErrors
[src]impl StructuralPartialEq for ValidationErrors
[src]
Auto Trait Implementations
impl RefUnwindSafe for ValidationErrors
impl Send for ValidationErrors
impl Sync for ValidationErrors
impl Unpin for ValidationErrors
impl UnwindSafe for ValidationErrors
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,