Skip to main content

EnvelopedData

Struct EnvelopedData 

Source
pub struct EnvelopedData<'a> {
    pub version: u64,
    pub originator: Option<OriginatorInfo<'a>>,
    pub recipients: OwnedVec<Recipient<'a>>,
    pub content: EncryptedContent<'a>,
    pub unprotected: Option<OwnedVec<Attribute<'a>>>,
    /* private fields */
}
Expand description

Complete EnvelopedData schema with original nested decoding context.

Fields§

§version: u64

Declared version, checked against all encoded choices before return.

§originator: Option<OriginatorInfo<'a>>

Optional originator certificates and revocation material.

§recipients: OwnedVec<Recipient<'a>>

Every original recipient, in source SET order.

§content: EncryptedContent<'a>

Original plaintext type, encryption parameters and ciphertext ranges.

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

Unauthenticated/unprotected attributes, never promoted to signed facts.

Implementations§

Source§

impl<'a> EnvelopedData<'a>

Source

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

Read one complete ContentInfo with the enveloped-data content type.

Source

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

Read one original embedded ContentInfo without rebuilding its encoding.

Source

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

Read the original EnvelopedData SEQUENCE, retaining its source/depth.

Source

pub fn element(&self) -> &Element<'a>

Whole original encoding, not reconstructed plaintext or trusted content.

Source

pub fn execution_in<'op, W: Work>(&self, current: &'op W) -> Execution<'op>
where 'a: 'op,

Original/current execution for a selected provider’s new work.

Source

pub fn reader_in<'op>(&self, current: &Reader<'op>) -> Result<Reader<'op>>
where 'a: 'op,

Reopen this whole original envelope at its exact original depth under the current operation. Descendants’ own reader APIs preserve field depth.

Trait Implementations§

Source§

impl<'a> Debug for EnvelopedData<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<'a> Unpin for EnvelopedData<'a>

§

impl<'a> UnsafeUnpin for EnvelopedData<'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.