pub struct CTBOld { /* private fields */ }Expand description
A CTB using the old format encoding.
See Section 4.2 of RFC 9580 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 crate::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