[][src]Struct async_coap::ContentFormat

pub struct ContentFormat(pub u16);

A type for representing a CoAP Content Format value.

Methods

impl ContentFormat[src]

pub const TEXT_PLAIN_UTF8: ContentFormat[src]

From IETF-RFC7252.

pub const APPLICATION_COSE_COSE_ENCRYPT0: ContentFormat[src]

From IETF-RFC8152

pub const APPLICATION_COSE_COSE_MAC0: ContentFormat[src]

From IETF-RFC8152

pub const APPLICATION_COSE_COSE_SIGN1: ContentFormat[src]

From IETF-RFC8152

From IETF-RFC7252.

pub const APPLICATION_XML: ContentFormat[src]

From IETF-RFC7252.

pub const APPLICATION_OCTET_STREAM: ContentFormat[src]

From IETF-RFC7252.

pub const APPLICATION_EXI: ContentFormat[src]

From IETF-RFC7252.

pub const APPLICATION_JSON: ContentFormat[src]

From IETF-RFC7252.

pub const APPLICATION_JSON_PATCH_JSON: ContentFormat[src]

From IETF-RFC6902 JavaScript Object Notation (JSON) Patch

pub const APPLICATION_MERGE_PATCH_JSON: ContentFormat[src]

From IETF-RFC7396 JSON Merge Patch

pub const APPLICATION_CBOR: ContentFormat[src]

From IETF-RFC7049 Concise Binary Object Representation (CBOR)

pub const APPLICATION_CWT: ContentFormat[src]

From IETF-RFC8392 CBOR Web Token

pub const APPLICATION_COSE_COSE_ENCRYPT: ContentFormat[src]

From IETF-RFC8152

pub const APPLICATION_COSE_COSE_MAC: ContentFormat[src]

From IETF-RFC8152

pub const APPLICATION_COSE_COSE_SIGN: ContentFormat[src]

From IETF-RFC8152

pub const APPLICATION_COSE_KEY: ContentFormat[src]

From IETF-RFC8152

pub const APPLICATION_COSE_KEY_SET: ContentFormat[src]

From IETF-RFC8152

pub const APPLICATION_SENML_JSON: ContentFormat[src]

JSON-formatted RFC8428 Sensor Measurement Lists (SenML)

pub const APPLICATION_SENSML_JSON: ContentFormat[src]

JSON-formatted RFC8428 Sensor Streaming Measurement List (SenSML)

pub const APPLICATION_SENML_CBOR: ContentFormat[src]

CBOR-formatted RFC8428 Sensor Measurement Lists (SenML)

pub const APPLICATION_SENSML_CBOR: ContentFormat[src]

CBOR-formatted RFC8428 Sensor Streaming Measurement List (SenSML)

pub const APPLICATION_SENML_EXI: ContentFormat[src]

EXI-formatted RFC8428 Sensor Measurement Lists (SenML)

pub const APPLICATION_SENSML_EXI: ContentFormat[src]

EXI-formatted RFC8428 Sensor Streaming Measurement List (SenSML)

pub const APPLICATION_SENML_XML: ContentFormat[src]

XML-formatted RFC8428 Sensor Measurement Lists (SenML)

pub const APPLICATION_SENSML_XML: ContentFormat[src]

XML-formatted RFC8428 Sensor Streaming Measurement List (SenSML)

pub const APPLICATION_COAP_GROUP_JSON: ContentFormat[src]

IETF-RFC7389 Group Communication for the Constrained Application Protocol

pub const APPLICATION_OSCORE: ContentFormat[src]

From RFC-ietf-core-object-security-16

pub const APPLICATION_JSON_DEFLATE: ContentFormat[src]

Same as application/json, but with deflate compression.

pub const APPLICATION_CBOR_DEFLATE: ContentFormat[src]

Same as application/cbor, but with deflate compression.

pub fn static_name(self) -> Option<&'static str>[src]

Returns the MIME name of this content format as a &'static str, if possible.

pub fn name(&self) -> Cow<'static, str>[src]

Returns a MIME name for this content format.

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

Returns true if this content format is known to contain UTF8.

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

Returns true if this content format is known to contain JSON.

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

Returns true if this content format is known to contain XML.

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

Returns true if this content format is known to contain EXI.

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

Returns true if this content format is known to contain CBOR.

Trait Implementations

impl Ord for ContentFormat[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<ContentFormat> for ContentFormat[src]

impl PartialEq<ContentFormat> for ContentFormat[src]

impl Clone for ContentFormat[src]

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

Performs copy-assignment from source. Read more

impl Eq for ContentFormat[src]

impl Copy for ContentFormat[src]

impl Display for ContentFormat[src]

impl Debug for ContentFormat[src]

impl Hash for ContentFormat[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

Blanket Implementations

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<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>,