Skip to main content

Pick

Enum Pick 

Source
pub enum Pick<'a> {
    Field(&'a Field),
    Element(&'a Asn1),
    Value(&'a Value),
    Jwt(JwtPick<'a>),
    Json(JsonPick<'a>),
}
Expand description

What a path selected.

Variants§

§

Field(&'a Field)

§

Element(&'a Asn1)

§

Value(&'a Value)

§

Jwt(JwtPick<'a>)

§

Json(JsonPick<'a>)

Implementations§

Source§

impl Pick<'_>

Source

pub fn to_json(&self) -> String

The selection as JSON, in its own format’s schema.

Source

pub fn to_tree(&self) -> String

The selection as an indented outline.

Source

pub fn payload(&self) -> Result<Vec<u8>, Diag>

The selection’s payload bytes, or NO_PAYLOAD for a group, a constructed element or a map/array value.

Trait Implementations§

Source§

impl<'a> Debug for Pick<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for Pick<'a>

§

impl<'a> Freeze for Pick<'a>
where &'a Field: Freeze, &'a Asn1: Freeze, &'a Value: Freeze, &'static str: Freeze, &'a Node: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, &'a str: Freeze,

§

impl<'a> Move for Pick<'a>

§

impl<'a> RefUnwindSafe for Pick<'a>

§

impl<'a> Send for Pick<'a>
where &'a Field: Send, &'a Asn1: Send, &'a Value: Send, &'static str: Send, &'a Node: Send, RawVecInner: Send, &'a str: Send,

§

impl<'a> Sync for Pick<'a>
where RawVecInner: Sync, BoxRaw<Node>: Sync, BoxRaw<Value>: Sync,

§

impl<'a> Unpin for Pick<'a>
where &'a Field: Unpin, &'a Asn1: Unpin, &'a Value: Unpin, &'static str: Unpin, &'a Node: Unpin, *const u8 is !null: Unpin, &'a str: Unpin,

§

impl<'a> UnsafeUnpin for Pick<'a>

§

impl<'a> UnwindSafe for Pick<'a>
where &'a Field: UnwindSafe, &'a Asn1: UnwindSafe, &'a Value: UnwindSafe, &'static str: UnwindSafe, &'a Node: UnwindSafe, RawVecInner: UnwindSafe, &'a str: UnwindSafe,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.