pub struct ValidationPath { /* private fields */ }Expand description
A bounded path to a value that failed validation.
Implementations§
Source§impl ValidationPath
impl ValidationPath
Sourcepub const fn root() -> Self
pub const fn root() -> Self
Creates the root path, used when an issue applies to the whole request.
Sourcepub fn new(
segments: Vec<ValidationPathSegment>,
) -> Result<Self, ValidationPathError>
pub fn new( segments: Vec<ValidationPathSegment>, ) -> Result<Self, ValidationPathError>
Creates a checked validation path.
Sourcepub fn segments(&self) -> &[ValidationPathSegment]
pub fn segments(&self) -> &[ValidationPathSegment]
Returns the path components in root-to-leaf order.
Trait Implementations§
Source§impl Clone for ValidationPath
impl Clone for ValidationPath
Source§impl Debug for ValidationPath
impl Debug for ValidationPath
Source§impl Default for ValidationPath
impl Default for ValidationPath
impl Eq for ValidationPath
Source§impl Hash for ValidationPath
impl Hash for ValidationPath
Source§impl PartialEq for ValidationPath
impl PartialEq for ValidationPath
impl StructuralPartialEq for ValidationPath
Auto Trait Implementations§
impl Freeze for ValidationPath
impl RefUnwindSafe for ValidationPath
impl Send for ValidationPath
impl Sync for ValidationPath
impl Unpin for ValidationPath
impl UnsafeUnpin for ValidationPath
impl UnwindSafe for ValidationPath
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