[−][src]Enum async_coap::message::MsgCode
Enum representing a CoAP message code.
Variants
Empty
Empty message code. Only used for ping requests, resets, and empty acknowledgements.
MethodGet
CoAP GET method.
MethodPost
CoAP POST method.
MethodPut
CoAP PUT method.
MethodDelete
CoAP DELETE method.
MethodFetch
CoAP FETCH method.
MethodPatch
CoAP PATCH method.
MethodIPatch
CoAP iPATCH method.
SuccessCreated
CoAP CREATED success code.
SuccessDeleted
CoAP DELETED success code.
SuccessValid
CoAP VALID success code.
SuccessChanged
CoAP CHANGED success code.
SuccessContent
CoAP CONTENT success code.
SuccessContinue
CoAP CONTINUE success code.
ClientErrorBadRequest
CoAP BAD_REQUEST client error.
CoAP UNAUTHORIZED client error.
ClientErrorBadOption
CoAP BAD_OPTION client error.
ClientErrorForbidden
CoAP FORBIDDEN client error.
ClientErrorNotFound
CoAP NOT_FOUND client error.
ClientErrorMethodNotAllowed
CoAP METHOD_NOT_ALLOWED client error.
ClientErrorNotAcceptable
CoAP NOT_ACCEPTABLE client error.
ClientErrorRequestEntityIncomplete
CoAP REQUEST_ENTITY_INCOMPLETE client error.
ClientErrorPreconditionFailed
CoAP PRECONDITION_FAILED client error.
ClientErrorRequestEntityTooLarge
CoAP REQUEST_ENTITY_TOO_LARGE client error.
ClientErrorUnsupportedMediaType
CoAP UNSUPPORTED_MEDIA_TYPE client error.
ClientErrorTooManyRequests
RFC8516 "Too Many Requests" Response Code for the Constrained Application Protocol
ServerErrorInternalServerError
CoAP INTERNAL_SERVER_ERROR server error.
ServerErrorNotImplemented
CoAP NOT_IMPLEMENTED server error.
ServerErrorBadGateway
CoAP BAD_GATEWAY server error.
CoAP SERVICE_UNAVAILABLE server error.
ServerErrorGatewayTimeout
CoAP GATEWAY_TIMEOUT server error.
ServerErrorProxyingNotSupported
CoAP PROXYING_NOT_SUPPORTED server error.
SignalCsm
CoAP CSM in-band signal.
SignalPing
CoAP PING in-band signal.
SignalPong
CoAP PONG in-band signal.
SignalRelease
CoAP RELEASE in-band signal.
SignalAbort
CoAP ABORT in-band signal.
Methods
impl MsgCode
[src]
pub fn try_from(x: u8) -> Option<MsgCode>
[src]
Tries to convert the given u8
into a MsgCode
. If the given code isn't recognized,
this method will return None
.
pub fn to_http_code(self) -> u16
[src]
Returns an approximation of this message code as an HTTP status code.
pub fn is_empty(self) -> bool
[src]
Returns true if this is the empty code.
pub fn is_method(self) -> bool
[src]
Returns true if message code is a method.
pub fn is_client_error(self) -> bool
[src]
Returns true if message code is a client error.
pub fn is_server_error(self) -> bool
[src]
Returns true if message code is a server error.
pub fn is_error(self) -> bool
[src]
Returns true if message code is any sort of error.
pub fn is_success(self) -> bool
[src]
Returns true if message code indicates success.
pub fn is_signal(self) -> bool
[src]
Returns true if message code is an in-band signal.
Trait Implementations
impl Clone for MsgCode
[src]
fn clone(&self) -> MsgCode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for MsgCode
[src]
impl From<MsgCode> for u8
[src]
impl From<MsgCode> for u16
[src]
impl From<MsgCode> for u32
[src]
impl Copy for MsgCode
[src]
impl Eq for MsgCode
[src]
impl PartialEq<MsgCode> for MsgCode
[src]
fn eq(&self, other: &MsgCode) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Debug for MsgCode
[src]
Auto Trait Implementations
impl Unpin for MsgCode
impl Sync for MsgCode
impl Send for MsgCode
impl UnwindSafe for MsgCode
impl RefUnwindSafe for MsgCode
Blanket Implementations
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> From<T> for 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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
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>,