[][src]Struct jsonp::Segment

pub struct Segment<'p> { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.