#[non_exhaustive]
pub enum CoapContentFormat {
Show 48 variants TextPlainUtf8 = 0, CoseEncrypt0 = 16, CoseMac0 = 17, CoseSign1 = 18, LinkFormat = 40, Xml = 41, OctetStream = 42, Exi = 47, Json = 50, JsonPatchJson = 51, MergePatchJson = 52, Cbor = 60, Cwt = 61, MultipartCore = 62, CborSeq = 63, CoseEncrypt = 96, CoseMac = 97, CoseSign = 98, CoseKey = 101, CoseKeySet = 102, SenmlJson = 110, SensmlJson = 111, SenmlCbor = 112, SensmlCbor = 113, SenmlExi = 114, SensmlExi = 115, CoapGroupJson = 256, DotsCbor = 271, Pkcs7MimeSmimeTypeServerGeneratedKey = 280, Pkcs7MimeSmimeTypeCertsOnly = 281, Pkcs7MimeSmimeTypeCmcRequest = 282, Pkcs7MimeSmimeTypeCmcResponse = 283, Pkcs8 = 284, Csrattrs = 285, Pkcs10 = 286, PkixCert = 287, SenmlXml = 310, SensmlXml = 311, SenmlEtchJson = 320, SenmlEtchCbor = 322, TdJson = 432, VndOcfCbor = 10_000, Oscore = 10_001, JsonDeflate = 11_050, CborDeflate = 11_060, VndOmaLwm2mTlv = 11_542, VndOmaLwm2mJson = 11_543, VndOmaLwm2mCbor = 11_544,
}
Expand description

CoAP Content Formats

From IANA registry https://www.iana.org/assignments/core-parameters/core-parameters.xhtml#content-formats as of 2021-03-19.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

TextPlainUtf8 = 0

text/plain; charset=utf-8

§

CoseEncrypt0 = 16

application/cose; cose-type=“cose-encrypt0”

§

CoseMac0 = 17

application/cose; cose-type=“cose-mac0”

§

CoseSign1 = 18

application/cose; cose-type=“cose-sign1”

§

LinkFormat = 40

application/link-format

§

Xml = 41

application/xml

§

OctetStream = 42

application/octet-stream

§

Exi = 47

application/exi

§

Json = 50

application/json

§

JsonPatchJson = 51

application/json-patch+json

§

MergePatchJson = 52

application/merge-patch+json

§

Cbor = 60

application/cbor

§

Cwt = 61

application/cwt

§

MultipartCore = 62

application/multipart-core

§

CborSeq = 63

application/cbor-seq

§

CoseEncrypt = 96

application/cose; cose-type=“cose-encrypt”

§

CoseMac = 97

application/cose; cose-type=“cose-mac”

§

CoseSign = 98

application/cose; cose-type=“cose-sign”

§

CoseKey = 101

application/cose-key

§

CoseKeySet = 102

application/cose-key-set

§

SenmlJson = 110

application/senml+json

§

SensmlJson = 111

application/sensml+json

§

SenmlCbor = 112

application/senml+cbor

§

SensmlCbor = 113

application/sensml+cbor

§

SenmlExi = 114

application/senml-exi

§

SensmlExi = 115

application/sensml-exi

§

CoapGroupJson = 256

application/coap-group+json

§

DotsCbor = 271

application/dots+cbor

§

Pkcs7MimeSmimeTypeServerGeneratedKey = 280

application/pkcs7-mime; smime-type=server-generated-key

§

Pkcs7MimeSmimeTypeCertsOnly = 281

application/pkcs7-mime; smime-type=certs-only

§

Pkcs7MimeSmimeTypeCmcRequest = 282

application/pkcs7-mime; smime-type=CMC-Request

§

Pkcs7MimeSmimeTypeCmcResponse = 283

application/pkcs7-mime; smime-type=CMC-Response

§

Pkcs8 = 284

application/pkcs8

§

Csrattrs = 285

application/csrattrs

§

Pkcs10 = 286

application/pkcs10

§

PkixCert = 287

application/pkix-cert

§

SenmlXml = 310

application/senml+xml

§

SensmlXml = 311

application/sensml+xml

§

SenmlEtchJson = 320

application/senml-etch+json

§

SenmlEtchCbor = 322

application/senml-etch+cbor

§

TdJson = 432

application/td+json

§

VndOcfCbor = 10_000

application/vnd.ocf+cbor

§

Oscore = 10_001

application/oscore

§

JsonDeflate = 11_050

§

CborDeflate = 11_060

§

VndOmaLwm2mTlv = 11_542

application/vnd.oma.lwm2m+tlv

§

VndOmaLwm2mJson = 11_543

application/vnd.oma.lwm2m+json

§

VndOmaLwm2mCbor = 11_544

application/vnd.oma.lwm2m+cbor

Trait Implementations§

source§

impl Clone for CoapContentFormat

source§

fn clone(&self) -> CoapContentFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CoapContentFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl EnumI64 for CoapContentFormat

source§

fn from_i64(i: i64) -> Option<Self>

source§

fn to_i64(&self) -> i64

source§

impl Ord for CoapContentFormat

source§

fn cmp(&self, other: &CoapContentFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for CoapContentFormat

source§

fn eq(&self, other: &CoapContentFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for CoapContentFormat

source§

fn partial_cmp(&self, other: &CoapContentFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for CoapContentFormat

source§

impl Eq for CoapContentFormat

source§

impl StructuralPartialEq for CoapContentFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.