[−][src]Struct coap_lite::Header
The message header.
Fields
code: MessageClass
message_id: u16
Methods
impl Header
[src]
pub fn new() -> Header
[src]
Creates a new header.
pub fn from_raw(raw: &HeaderRaw) -> Header
[src]
Creates a new header from a raw header.
pub fn to_raw(&self) -> HeaderRaw
[src]
Returns the raw header.
pub fn set_version(&mut self, v: u8)
[src]
Sets the version.
pub fn get_version(&self) -> u8
[src]
Returns the version.
pub fn set_type(&mut self, t: MessageType)
[src]
Sets the message type.
pub fn get_type(&self) -> MessageType
[src]
Returns the message type.
pub fn set_token_length(&mut self, tkl: u8)
[src]
Sets the token length.
pub fn get_token_length(&self) -> u8
[src]
Returns the token length.
pub fn set_code(&mut self, code: &str)
[src]
Sets the message code from a string.
pub fn get_code(&self) -> String
[src]
Returns the message code as a string.
Trait Implementations
Auto Trait Implementations
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
impl RefUnwindSafe for Header
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,