ReferenceToken

Struct ReferenceToken 

Source
pub struct ReferenceToken(/* private fields */);

Implementations§

Source§

impl ReferenceToken

Source

pub const unsafe fn new_unchecked(s: &str) -> &ReferenceToken

Converts the given string into a JSON pointer reference token without validation.

§Safety

The input string must be a valid JSON pointer reference token.

Source

pub fn is_escaped(&self) -> bool

Source

pub fn as_bytes(&self) -> &[u8]

Source

pub fn as_str(&self) -> &str

Source

pub fn to_decoded(&self) -> Cow<'_, str>

Source

pub fn decode(&self) -> String

Source

pub fn as_array_index(&self) -> Option<usize>

Trait Implementations§

Source§

impl Debug for ReferenceToken

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for ReferenceToken

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> WithContext for T
where T: ?Sized,

Source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

Source§

fn into_with<C>(self, context: C) -> Contextual<T, C>