pub struct Packet {
pub start: usize,
pub end: usize,
pub tag: PacketTag,
pub body: PacketBody,
pub fields: Vec<Field>,
pub children: Vec<Packet>,
pub child_buffer: Option<Arc<[u8]>>,
}Expand description
A parsed OpenPGP packet with metadata and fields.
Contains the raw packet boundaries, parsed body, and a list of human-readable fields.
Fields§
§start: usizeByte offset where this packet starts in the original data.
end: usizeByte offset where this packet ends (exclusive).
tag: PacketTagThe packet type tag.
body: PacketBodyThe parsed packet body.
fields: Vec<Field>Parsed fields for display.
children: Vec<Packet>Nested packets parsed from this packet’s decompressed payload
(Compressed Data packets only). Their spans index
Packet::child_buffer, not the original data.
child_buffer: Option<Arc<[u8]>>The decompressed buffer that children spans index into.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnsafeUnpin for Packet
impl UnwindSafe for Packet
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