Struct kwap_msg::OptNumber[][src]

pub struct OptNumber(pub u32);
Expand description

The Option number identifies which Option is being set (e.g. Content-Format has a Number of 12)

Because Option Numbers are only able to be computed in the context of other options, in order to get Option Numbers you must have a collection of Opts.

Then you can use the provided EnumerateOptNumbers iterator extension to enumerate over options with their numbers.

Click to see table of Option Numbers defined in the original CoAP RFC
+--------+------------------+-----------+
| Number | Name             | Reference |
+--------+------------------+-----------+
|      0 | (Reserved)       | [RFC7252] |
|      1 | If-Match         | [RFC7252] |
|      3 | Uri-Host         | [RFC7252] |
|      4 | ETag             | [RFC7252] |
|      5 | If-None-Match    | [RFC7252] |
|      7 | Uri-Port         | [RFC7252] |
|      8 | Location-Path    | [RFC7252] |
|     11 | Uri-Path         | [RFC7252] |
|     12 | Content-Format   | [RFC7252] |
|     14 | Max-Age          | [RFC7252] |
|     15 | Uri-Query        | [RFC7252] |
|     17 | Accept           | [RFC7252] |
|     20 | Location-Query   | [RFC7252] |
|     35 | Proxy-Uri        | [RFC7252] |
|     39 | Proxy-Scheme     | [RFC7252] |
|     60 | Size1            | [RFC7252] |
|    128 | (Reserved)       | [RFC7252] |
|    132 | (Reserved)       | [RFC7252] |
|    136 | (Reserved)       | [RFC7252] |
|    140 | (Reserved)       | [RFC7252] |
+--------+------------------+-----------+

Tuple Fields

0: u32

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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

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

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

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.