Struct sequoia_openpgp::cert::raw::RawPacket
source · pub struct RawPacket<'a> { /* private fields */ }
Expand description
A mostly unparsed Packet
.
This is returned by RawCert::packets
.
The data includes the OpenPGP framing (i.e., the CTB, and length
information). RawPacket::body
returns just the bytes
corresponding to the packet’s body, i.e., without the OpenPGP
framing.
You can convert it to a Packet
using TryFrom
.
§Examples
use sequoia_openpgp as openpgp;
use openpgp::packet::Packet;
use openpgp::packet::Tag;
for p in rawcert.packets() {
if p.tag() == Tag::SecretSubkey {
if let Ok(packet) = Packet::try_from(p) {
// Do something with the packet.
}
}
}
Implementations§
Trait Implementations§
source§impl<'a> PartialEq for RawPacket<'a>
impl<'a> PartialEq for RawPacket<'a>
impl<'a> Eq for RawPacket<'a>
impl<'a> StructuralPartialEq for RawPacket<'a>
Auto Trait Implementations§
impl<'a> Freeze for RawPacket<'a>
impl<'a> RefUnwindSafe for RawPacket<'a>
impl<'a> Send for RawPacket<'a>
impl<'a> Sync for RawPacket<'a>
impl<'a> Unpin for RawPacket<'a>
impl<'a> UnwindSafe for RawPacket<'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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)