pub struct Header {
pub code: MessageClass,
pub message_id: u16,
/* private fields */
}
Expand description
The message header.
Fields§
§code: MessageClass
§message_id: u16
Implementations§
source§impl Header
impl Header
sourcepub fn set_version(&mut self, v: u8)
pub fn set_version(&mut self, v: u8)
Sets the version.
sourcepub fn get_version(&self) -> u8
pub fn get_version(&self) -> u8
Returns the version.
sourcepub fn set_type(&mut self, t: MessageType)
pub fn set_type(&mut self, t: MessageType)
Sets the message type.
sourcepub fn get_type(&self) -> MessageType
pub fn get_type(&self) -> MessageType
Returns the message type.
sourcepub fn set_token_length(&mut self, tkl: u8)
pub fn set_token_length(&mut self, tkl: u8)
Sets the token length.
sourcepub fn get_token_length(&self) -> u8
pub fn get_token_length(&self) -> u8
Returns the token length.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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