[][src]Enum async_coap::ResponseStatus

pub enum ResponseStatus<T = ()> {
    Done(T),
    SendNext,
    Continue,
}

Successful return type from send descriptor handler method that indicates what should happen next.

Variants

Done(T)

Emit the given value.

SendNext

Allocate a new Message ID, resend a new request, and wait for the associated response.

This is used when handling block requests to fetch additional blocks, among other cases.

Continue

Wait for additional responses to the original request without sending new requests.

This is used when handling multicast requests and observing.

Methods

impl<T> ResponseStatus<T>[src]

pub fn done(self) -> Option<T>[src]

If the response status is Done(value), returns Some(value), otherwise returns None.

pub fn is_done(&self) -> bool[src]

Returns true if the response status is Done(...), false otherwise.

pub fn is_send_next(&self) -> bool[src]

Returns true if the response status is SendNext, false otherwise.

pub fn is_continue(&self) -> bool[src]

Returns true if the response status is Continue, false otherwise.

pub fn as_ref(&self) -> ResponseStatus<&T>[src]

Converts the contained type to be a reference, so that Done(T) becomes Done(&T).

pub fn as_mut(&mut self) -> ResponseStatus<&mut T>[src]

Converts the contained type to be a mutable reference, so that Done(T) becomes Done(&mut T).

Trait Implementations

impl<T: PartialEq> PartialEq<ResponseStatus<T>> for ResponseStatus<T>[src]

impl<T: Clone> Clone for ResponseStatus<T>[src]

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

Performs copy-assignment from source. Read more

impl<T: Eq> Eq for ResponseStatus<T>[src]

impl<T: Copy> Copy for ResponseStatus<T>[src]

impl<T: Debug> Debug for ResponseStatus<T>[src]

Auto Trait Implementations

impl<T> Send for ResponseStatus<T> where
    T: Send

impl<T> Unpin for ResponseStatus<T> where
    T: Unpin

impl<T> Sync for ResponseStatus<T> where
    T: Sync

impl<T> UnwindSafe for ResponseStatus<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for ResponseStatus<T> where
    T: RefUnwindSafe

Blanket Implementations

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.

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