[−][src]Struct jsonp::Segment
Represents a segment of a pointer
Implementations
impl<'p> Segment<'p>
[src]
pub fn lazy(s: &'p str) -> Self
[src]
Lazily type the pointer, delaying the declaration until called by the Json deserializer.
Note this allows for processing of all valid Json map keys; however, using this type can also deserialize Json arrays if the key is is parsable as a number.
If you need strongly typed pointers see the key
and
index
methods.
pub fn early(s: &'p str) -> Self
[src]
Parse a pointer from a string slice, by attempting to convert it to a number, and if successful setting it as an array index, otherwise using it as a map key.
pub fn key(s: &'p str) -> Self
[src]
Generate a new map key segment
pub fn index(idx: u64) -> Self
[src]
Generate a new array index segment
Trait Implementations
impl<'p> Clone for Segment<'p>
[src]
impl<'p> Copy for Segment<'p>
[src]
impl<'p> Debug for Segment<'p>
[src]
Auto Trait Implementations
impl<'p> RefUnwindSafe for Segment<'p>
impl<'p> Send for Segment<'p>
impl<'p> Sync for Segment<'p>
impl<'p> Unpin for Segment<'p>
impl<'p> UnwindSafe for Segment<'p>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,