pub enum Extension {
Ext(i8, Vec<u8>),
Timestamp(Duration),
}Expand description
Custom extension definition as reference to a bytes source.
Variants§
Ext(i8, Vec<u8>)
n-bytes custom extension
Timestamp(Duration)
Protocol reserved extension to represent timestamps
Implementations§
Trait Implementations§
Source§impl Unpackable for Extension
impl Unpackable for Extension
Source§fn unpack(buf: &[u8]) -> Result<(usize, Self), Self::Error>
fn unpack(buf: &[u8]) -> Result<(usize, Self), Self::Error>
Unpacks a value from the buffer, returning the deserialized value and the amount of read
bytes.
Source§fn unpack_iter<I>(bytes: I) -> Result<(usize, Self), Self::Error>where
I: IntoIterator<Item = u8>,
fn unpack_iter<I>(bytes: I) -> Result<(usize, Self), Self::Error>where
I: IntoIterator<Item = u8>,
Unpacks a value from an iterator of bytes, returning the deserialized value and the amount
of read bytes. Read more
impl Eq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
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