[−][src]Struct coap_lite::Header
The message header.
Fields
code: MessageClassmessage_id: u16Implementations
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 RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
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.
pub fn to_owned(&self) -> T[src]
pub 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.
pub 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>,