Struct kwap_msg::Opt[][src]

pub struct Opt<C: Collection<u8>> where
    for<'a> &'a C: IntoIterator<Item = &'a u8>, 
{ pub delta: OptDelta, pub value: OptValue<C>, }
Expand description

Low-level representation of a freshly parsed CoAP Option

Both requests and responses may include a list of one or more options. For example, the URI in a request is transported in several options, and metadata that would be carried in an HTTP header in HTTP is supplied as options as well.

Option Numbers

This struct just stores data parsed directly from the message on the wire, and does not compute or store the Option Number.

To get Option OptNumbers, you can use the iterator extension EnumerateOptNumbers on a collection of Opts.

Fields

delta: OptDeltavalue: OptValue<C>

Implementations

Given a collection to Extend and an Opt, add that Opt’s bytes to the collection.

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

Returns the “default value” for a type. Read more

Creates an iterator which gives the current Opt along with its Number. Read more

Creates an iterator which gives the current Opt along with its Number. Read more

Get the runtime size (in bytes) of a struct Read more

Get the max size that this data structure can acommodate. Read more

Check if the runtime size is zero Read more

Is there no room left in this collection?

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

Creates an iterator which gives the current Opt along with its Number. Read more

Creates an iterator which gives the current Opt along with its Number. 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.