pub struct ValidationPath { /* private fields */ }Expand description
A cursor into the payload being validated.
The path is only rendered into a String when a violation is actually recorded, so
validating a valid payload allocates nothing beyond the (reusable) segment stack.
Implementations§
Source§impl ValidationPath
impl ValidationPath
Sourcepub fn push_index(&mut self, index: usize)
pub fn push_index(&mut self, index: usize)
Descends into an array element.
Sourcepub fn to_pointer(&self) -> String
pub fn to_pointer(&self) -> String
Renders the current position as an RFC 6901 JSON pointer, e.g. /evse/0/connectorId.
Trait Implementations§
Source§impl Clone for ValidationPath
impl Clone for ValidationPath
Source§impl Debug for ValidationPath
impl Debug for ValidationPath
Auto Trait Implementations§
impl Forget for ValidationPath
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