pub struct ErrorEntry {
pub path: String,
pub field: String,
pub part: Option<String>,
pub rule: String,
pub message: String,
pub label: Option<String>,
/* private fields */
}Expand description
One failed rule.
Fields§
§path: StringThe failing path (text, tags[2], home.city; $ for the root).
field: StringThe nearest named field (tags for tags[2]), empty for the root.
part: Option<String>The request part the path was prefixed with (body, query, …);
none for a schema checked on its own.
rule: StringThe rule code (required, min_len, check, …).
message: StringThe rendered, sanitized message.
label: Option<String>The field’s label, when it has one.
Implementations§
Source§impl ErrorEntry
impl ErrorEntry
Sourcepub fn params_json(&self) -> Option<Value>
pub fn params_json(&self) -> Option<Value>
The parameters as JSON, for the 422 body.
Trait Implementations§
Source§impl Clone for ErrorEntry
impl Clone for ErrorEntry
Source§impl Debug for ErrorEntry
impl Debug for ErrorEntry
Source§impl PartialEq for ErrorEntry
impl PartialEq for ErrorEntry
impl StructuralPartialEq for ErrorEntry
Auto Trait Implementations§
impl Freeze for ErrorEntry
impl RefUnwindSafe for ErrorEntry
impl Send for ErrorEntry
impl Sync for ErrorEntry
impl Unpin for ErrorEntry
impl UnsafeUnpin for ErrorEntry
impl UnwindSafe for ErrorEntry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more