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
sourceimpl 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
sourceimpl MarshalInto for CTBOld
impl MarshalInto for CTBOld
sourcefn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
sourcefn 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 RefUnwindSafe for CTBOld
impl Send for CTBOld
impl Sync for CTBOld
impl Unpin for CTBOld
impl UnwindSafe for CTBOld
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more