pub struct ValidationIssueWithCode {
pub path: String,
pub message: String,
pub code: String,
}Expand description
A validation issue with an error code:
{ "path": "...", "message": "...", "code": "..." }.
Fields§
§path: String§message: String§code: StringImplementations§
Source§impl ValidationIssueWithCode
impl ValidationIssueWithCode
Sourcepub fn parse<__VldInputT: VldInput + ?Sized>(
input: &__VldInputT,
) -> Result<ValidationIssueWithCode, VldError>
pub fn parse<__VldInputT: VldInput + ?Sized>( input: &__VldInputT, ) -> Result<ValidationIssueWithCode, 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<ValidationIssueWithCode, VldError>
pub fn parse_value( __vld_json: &Value, ) -> Result<ValidationIssueWithCode, VldError>
Parse and validate directly from a serde_json::Value.
Trait Implementations§
Source§impl Clone for ValidationIssueWithCode
impl Clone for ValidationIssueWithCode
Source§fn clone(&self) -> ValidationIssueWithCode
fn clone(&self) -> ValidationIssueWithCode
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 ValidationIssueWithCode
impl Debug for ValidationIssueWithCode
Source§impl Serialize for ValidationIssueWithCode
impl Serialize for ValidationIssueWithCode
Source§impl VldParse for ValidationIssueWithCode
impl VldParse for ValidationIssueWithCode
Auto Trait Implementations§
impl Freeze for ValidationIssueWithCode
impl RefUnwindSafe for ValidationIssueWithCode
impl Send for ValidationIssueWithCode
impl Sync for ValidationIssueWithCode
impl Unpin for ValidationIssueWithCode
impl UnwindSafe for ValidationIssueWithCode
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