Struct sequoia_openpgp::parse::map::Map
source · pub struct Map { /* private fields */ }Expand description
Map created during parsing.
Implementations§
source§impl Map
impl Map
sourcepub fn iter(&self) -> impl Iterator<Item = Field<'_>> + Send + Sync
pub fn iter(&self) -> impl Iterator<Item = Field<'_>> + Send + Sync
Creates an iterator over the map.
Returns references to Fields.
Examples
use sequoia_openpgp as openpgp;
use openpgp::parse::{Parse, PacketParserBuilder};
let message_data = b"\xcb\x12t\x00\x00\x00\x00\x00Hello world.";
let pp = PacketParserBuilder::from_bytes(message_data)?
.map(true) // Enable mapping.
.build()?
.expect("One packet, not EOF");
let map = pp.map().expect("Mapping is enabled");
assert_eq!(map.iter().count(), 6);Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for Map
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