pub struct WireHeader<T: ImmutableData> { /* private fields */ }
Expand description
Header generic over arbitrary storage for wire encoding
Implementations§
Source§impl<T: ImmutableData> WireHeader<T>
impl<T: ImmutableData> WireHeader<T>
pub fn protocol_version(&self) -> u16
pub fn application_id(&self) -> u16
pub fn kind(&self) -> Kind
pub fn flags(&self) -> Flags
pub fn index(&self) -> u16
pub fn data_len(&self) -> usize
pub fn private_options_len(&self) -> usize
pub fn public_options_len(&self) -> usize
Source§impl<T: MutableData> WireHeader<T>
impl<T: MutableData> WireHeader<T>
Sourcepub fn set_protocol_version(&mut self, version: u16)
pub fn set_protocol_version(&mut self, version: u16)
Set the protocol version
Sourcepub fn set_application_id(&mut self, application_id: u16)
pub fn set_application_id(&mut self, application_id: u16)
Set the application ID
Sourcepub fn set_data_len(&mut self, data_len: usize)
pub fn set_data_len(&mut self, data_len: usize)
Set the body field length
Sourcepub fn set_private_options_len(&mut self, private_options_len: usize)
pub fn set_private_options_len(&mut self, private_options_len: usize)
Set the private options field length
Sourcepub fn set_public_options_len(&mut self, public_options_len: usize)
pub fn set_public_options_len(&mut self, public_options_len: usize)
Set the public options field length
Trait Implementations§
Source§impl<T: ImmutableData> From<&WireHeader<T>> for Header
impl<T: ImmutableData> From<&WireHeader<T>> for Header
Source§fn from(wh: &WireHeader<T>) -> Header
fn from(wh: &WireHeader<T>) -> Header
Build a base::Header object from a WireHeader
Auto Trait Implementations§
impl<T> Freeze for WireHeader<T>where
T: Freeze,
impl<T> RefUnwindSafe for WireHeader<T>where
T: RefUnwindSafe,
impl<T> Send for WireHeader<T>where
T: Send,
impl<T> Sync for WireHeader<T>where
T: Sync,
impl<T> Unpin for WireHeader<T>where
T: Unpin,
impl<T> UnwindSafe for WireHeader<T>where
T: UnwindSafe,
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