Skip to main content

ContentInfo

Struct ContentInfo 

Source
pub struct ContentInfo<'a> { /* private fields */ }
Expand description

The CMS ContentInfo envelope (RFC 5652 §3).

Its explicit content field is mandatory. Detached SignedData instead omits the inner Encapsulated eContent (RFC 5652 §5.2). This type does not use the older PKCS#7 optional outer-content grammar from RFC 2315 §7.

Implementations§

Source§

impl<'a> ContentInfo<'a>

Source

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

Reads one complete envelope, refusing bytes after that envelope.

The returned reader produced the content element and retains the same parser budget, execution account, diagnostic path and inherited depth. It is used directly by the selected content schema; no encode/reparse adapter or replacement parser is created.

Source

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

Reads an embedded envelope from its original producing parent.

Unlike Self::read, surrounding siblings belong to the enclosing schema and are not refused. Envelope components themselves remain exact.

Source

pub fn kind(&self) -> Oid<'a>

The original content type identifier, without an application interpretation.

Source

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

The original embedded content element, including its encoding.

Source

pub fn span(&self) -> Span

The envelope’s original source range.

Trait Implementations§

Source§

impl<'a> Debug for ContentInfo<'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 ContentInfo<'a>

§

impl<'a> RefUnwindSafe for ContentInfo<'a>

§

impl<'a> Send for ContentInfo<'a>

§

impl<'a> Sync for ContentInfo<'a>

§

impl<'a> Unpin for ContentInfo<'a>

§

impl<'a> UnsafeUnpin for ContentInfo<'a>

§

impl<'a> UnwindSafe for ContentInfo<'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.