Struct sequoia_openpgp::packet::Container
source · 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§
source§impl 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.