Struct sequoia_openpgp::packet::header::CTBOld
source · pub struct CTBOld { /* private fields */ }
Expand description
A CTB using the old format encoding.
See Section 4.2 of RFC 4880 for more details.
Implementations§
source§impl CTBOld
impl CTBOld
sourcepub fn new(tag: Tag, length: BodyLength) -> Result<Self>
pub fn new(tag: Tag, length: BodyLength) -> Result<Self>
Constructs an old-style CTB.
§Errors
Returns Error::InvalidArgument
if the tag or the body
length cannot be expressed using an old-style CTB.
sourcepub fn length_type(&self) -> PacketLengthType
pub fn length_type(&self) -> PacketLengthType
Returns the packet’s length type.
Trait Implementations§
source§impl MarshalInto for CTBOld
impl MarshalInto for CTBOld
source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
Auto Trait Implementations§
impl Freeze for CTBOld
impl RefUnwindSafe for CTBOld
impl Send for CTBOld
impl Sync for CTBOld
impl Unpin for CTBOld
impl UnwindSafe for CTBOld
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
)