[][src]Struct coap_lite::CoapRequest

pub struct CoapRequest<Endpoint> {
    pub message: Packet,
    pub response: Option<CoapResponse>,
    pub source: Option<Endpoint>,
}

The CoAP request.

Fields

message: Packetresponse: Option<CoapResponse>source: Option<Endpoint>

Implementations

impl<Endpoint> CoapRequest<Endpoint>[src]

pub fn new() -> CoapRequest<Endpoint>[src]

Creates a new request.

pub fn from_packet(packet: Packet, source: Endpoint) -> CoapRequest<Endpoint>[src]

Creates a request from a packet.

pub fn set_method(&mut self, method: Method)[src]

Sets the method.

pub fn get_method(&self) -> &Method[src]

Returns the method.

pub fn set_path(&mut self, path: &str)[src]

Sets the path.

pub fn get_path(&self) -> String[src]

Returns the path.

pub fn get_observe_flag(&self) -> Option<ObserveOption>[src]

Returns the flag in the Observe option.

Trait Implementations

impl<Endpoint: Clone> Clone for CoapRequest<Endpoint>[src]

impl<Endpoint: Debug> Debug for CoapRequest<Endpoint>[src]

impl<Endpoint> Default for CoapRequest<Endpoint>[src]

Auto Trait Implementations

impl<Endpoint> RefUnwindSafe for CoapRequest<Endpoint> where
    Endpoint: RefUnwindSafe

impl<Endpoint> Send for CoapRequest<Endpoint> where
    Endpoint: Send

impl<Endpoint> Sync for CoapRequest<Endpoint> where
    Endpoint: Sync

impl<Endpoint> Unpin for CoapRequest<Endpoint> where
    Endpoint: Unpin

impl<Endpoint> UnwindSafe for CoapRequest<Endpoint> where
    Endpoint: UnwindSafe

Blanket Implementations

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

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

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

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

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, 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.