Skip to main content

Bag

Struct Bag 

Source
pub struct Bag<'a> {
    pub kind: Oid<'a>,
    pub original: EncodedValue<'a>,
    pub value: BagValue<'a>,
    pub attributes: Option<OwnedVec<Attribute<'a>>>,
}
Expand description

SafeBag with original identity/attributes and decoded value.

Fields§

§kind: Oid<'a>

Original bag identifier, including unknown extensions.

§original: EncodedValue<'a>

Original whole bag encoding and producing context.

§value: BagValue<'a>

Parsed original value, never a product-selected key.

§attributes: Option<OwnedVec<Attribute<'a>>>

Optional original attributes, including repeated/empty unknown values.

Implementations§

Source§

impl<'a> Bag<'a>

Source

pub fn read(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>

Reads one complete original SafeBag. All six standard alternatives use the existing shared field kernels, not a second BER grammar.

Auto Trait Implementations§

§

impl<'a> !Freeze for Bag<'a>

§

impl<'a> !RefUnwindSafe for Bag<'a>

§

impl<'a> !Send for Bag<'a>

§

impl<'a> !Sync for Bag<'a>

§

impl<'a> !UnwindSafe for Bag<'a>

§

impl<'a> Unpin for Bag<'a>

§

impl<'a> UnsafeUnpin for Bag<'a>

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.