pub struct JsonPointer { /* private fields */ }Expand description
A parsed plain RFC 6901 JSON Pointer.
Implementations§
Source§impl JsonPointer
impl JsonPointer
Sourcepub fn parse(input: &str) -> Result<JsonPointer, PointerError>
pub fn parse(input: &str) -> Result<JsonPointer, PointerError>
Parses a plain JSON Pointer. URI fragment syntax is not accepted.
§Errors
Returns an error when input is not valid RFC 6901 pointer syntax.
Sourcepub fn tokens(&self) -> &[ReferenceToken]
pub fn tokens(&self) -> &[ReferenceToken]
Returns the decoded reference tokens.
Sourcepub fn is_proper_prefix_of(&self, other: &JsonPointer) -> bool
pub fn is_proper_prefix_of(&self, other: &JsonPointer) -> bool
Returns whether this pointer is a proper token-prefix of other.
Trait Implementations§
Source§impl Clone for JsonPointer
impl Clone for JsonPointer
Source§fn clone(&self) -> JsonPointer
fn clone(&self) -> JsonPointer
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 JsonPointer
impl Debug for JsonPointer
impl Eq for JsonPointer
Source§impl FromStr for JsonPointer
impl FromStr for JsonPointer
Source§type Err = PointerError
type Err = PointerError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<JsonPointer, <JsonPointer as FromStr>::Err>
fn from_str(value: &str) -> Result<JsonPointer, <JsonPointer as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl PartialEq for JsonPointer
impl PartialEq for JsonPointer
impl StructuralPartialEq for JsonPointer
Auto Trait Implementations§
impl Freeze for JsonPointer
impl RefUnwindSafe for JsonPointer
impl Send for JsonPointer
impl Sync for JsonPointer
impl Unpin for JsonPointer
impl UnsafeUnpin for JsonPointer
impl UnwindSafe for JsonPointer
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