pub struct Encapsulated<'a> { /* private fields */ }Expand description
Attached or absent encapsulated content (RFC 5652 §5.2).
Implementations§
Source§impl<'a> Encapsulated<'a>
impl<'a> Encapsulated<'a>
Sourcepub fn read(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
pub fn read(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
Reads type and optional explicit OCTET STRING under the original parent.
Absence denotes detached content. Empty attached content is a distinct value, and no caller-supplied payload silently replaces attached bytes.
Sourcepub fn content(&self) -> Option<&Octets<'a>>
pub fn content(&self) -> Option<&Octets<'a>>
Attached logical octets, or None for detached content.
Sourcepub fn is_detached(&self) -> bool
pub fn is_detached(&self) -> bool
Whether the envelope omitted the content field.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for Encapsulated<'a>
impl<'a> !RefUnwindSafe for Encapsulated<'a>
impl<'a> !Send for Encapsulated<'a>
impl<'a> !Sync for Encapsulated<'a>
impl<'a> !UnwindSafe for Encapsulated<'a>
impl<'a> Unpin for Encapsulated<'a>
impl<'a> UnsafeUnpin for Encapsulated<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more