[−][src]Enum async_coap::ResponseStatus
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]
fn eq(&self, other: &ResponseStatus<T>) -> bool
[src]
fn ne(&self, other: &ResponseStatus<T>) -> bool
[src]
impl<T: Clone> Clone for ResponseStatus<T>
[src]
fn clone(&self) -> 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> Unpin for ResponseStatus<T> where
T: Unpin,
T: Unpin,
impl<T> Send for ResponseStatus<T> where
T: Send,
T: Send,
impl<T> Sync for ResponseStatus<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for ResponseStatus<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for ResponseStatus<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,