[][src]Enum async_coap::message::MsgType

pub enum MsgType {
    Con,
    Non,
    Ack,
    Res,
}

Enum representing the CoAP message type: CON, NON, ACK, and RES.

Variants

Con

Variant for confirmable CoAP messages.

Non

Variant for non-confirmable CoAP messages.

Ack

Variant for CoAP message acknowledgements.

Res

Variant for CoAP reset messages.

Methods

impl MsgType[src]

pub fn from(tt: u8) -> MsgType[src]

Creates a new MsgType from the given value, panicing if the value is invalid.

pub fn try_from(tt: u8) -> Option<MsgType>[src]

Creates a new MsgType from the given value, returning None if the value is invalid.

pub fn is_non(self) -> bool[src]

Returns true if this message type is nonconfirmable (NON).

pub fn is_con(self) -> bool[src]

Returns true if this message type is confirmable (CON).

pub fn is_ack(self) -> bool[src]

Returns true if this message type is an acknowledgement (ACK).

pub fn is_res(self) -> bool[src]

Returns true if this message type is a reset (RES).

Trait Implementations

impl Clone for MsgType[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for MsgType[src]

impl Copy for MsgType[src]

impl Eq for MsgType[src]

impl PartialEq<MsgType> for MsgType[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Debug for MsgType[src]

Auto Trait Implementations

impl Unpin for MsgType

impl Sync for MsgType

impl Send for MsgType

impl UnwindSafe for MsgType

impl RefUnwindSafe for MsgType

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,