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§fn clone(&self) -> ValidationPath
fn clone(&self) -> ValidationPath
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ValidationPath
impl Debug for ValidationPath
Source§impl Default for ValidationPath
impl Default for ValidationPath
Source§fn default() -> ValidationPath
fn default() -> ValidationPath
Returns the “default value” for a type. Read more
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