pub struct ValidationErrorBody {
pub error: String,
pub issues: Vec<ValidationIssue>,
}Expand description
Validation error response body:
{ "error": "Validation failed", "issues": [...] }.
Fields§
§error: String§issues: Vec<ValidationIssue>Implementations§
Source§impl ValidationErrorBody
impl ValidationErrorBody
Sourcepub fn parse<__VldInputT: VldInput + ?Sized>(
input: &__VldInputT,
) -> Result<ValidationErrorBody, VldError>
pub fn parse<__VldInputT: VldInput + ?Sized>( input: &__VldInputT, ) -> Result<ValidationErrorBody, VldError>
Parse and validate input data into this struct.
Accepts any type implementing [VldInput]: JSON strings, file paths,
serde_json::Value, byte slices, etc.
Sourcepub fn parse_value(__vld_json: &Value) -> Result<ValidationErrorBody, VldError>
pub fn parse_value(__vld_json: &Value) -> Result<ValidationErrorBody, VldError>
Parse and validate directly from a serde_json::Value.
Trait Implementations§
Source§impl Clone for ValidationErrorBody
impl Clone for ValidationErrorBody
Source§fn clone(&self) -> ValidationErrorBody
fn clone(&self) -> ValidationErrorBody
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationErrorBody
impl Debug for ValidationErrorBody
Source§impl Serialize for ValidationErrorBody
impl Serialize for ValidationErrorBody
Source§impl VldParse for ValidationErrorBody
impl VldParse for ValidationErrorBody
Auto Trait Implementations§
impl Freeze for ValidationErrorBody
impl RefUnwindSafe for ValidationErrorBody
impl Send for ValidationErrorBody
impl Sync for ValidationErrorBody
impl Unpin for ValidationErrorBody
impl UnwindSafe for ValidationErrorBody
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