pub struct Container { /* private fields */ }
Expand description
Holds packet bodies.
This is used by OpenPGP container packets, like the compressed data packet, to store the containing packets.
Implementations
sourceimpl Container
impl Container
sourcepub fn children_ref(&self) -> Option<&[Packet]>
pub fn children_ref(&self) -> Option<&[Packet]>
Returns a reference to this Packet’s children.
Returns None
if the body is not structured.
sourcepub fn children_mut(&mut self) -> Option<&mut Vec<Packet>>
pub fn children_mut(&mut self) -> Option<&mut Vec<Packet>>
Returns a mutable reference to this Packet’s children.
Returns None
if the body is not structured.
sourcepub fn descendants(&self) -> Option<Iter<'_>>
pub fn descendants(&self) -> Option<Iter<'_>>
Returns an iterator over the packet’s descendants. The descendants are visited in depth-first order.
Returns None
if the body is not structured.
sourcepub fn children(&self) -> Option<Iter<'_, Packet>>
pub fn children(&self) -> Option<Iter<'_, Packet>>
Returns an iterator over the packet’s immediate children.
Returns None
if the body is not structured.
sourcepub fn into_children(self) -> Option<IntoIter<Packet>>
pub fn into_children(self) -> Option<IntoIter<Packet>>
Returns an IntoIter
over the packet’s immediate children.
Returns None
if the body is not structured.
Trait Implementations
impl Eq for Container
Auto Trait Implementations
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more