Module kwap_msg::alloc[][src]

Expand description

Crate root for allocating CoAP messages

Depends on crate feature alloc and either std or a #[global_allocator]!

use kwap_msg::alloc as msg;
use msg::{Message, TryFromBytes};

Re-exports

pub use crate::no_alloc::Code;
pub use crate::no_alloc::Id;
pub use crate::no_alloc::Token;
pub use crate::no_alloc::Type;
pub use crate::no_alloc::Version;

Structs

Iterator yielded by EnumerateOptNumbers, wrapping an Iterator over Opts.

Low-level representation of a message that has been parsed from a byte array

Low-level representation of a freshly parsed CoAP Option

The “Option Delta” is the difference between this Option’s Number and the previous Option’s number.

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

Option Value

Low-level representation of the message payload

Enums

Errors encounterable while parsing a message from bytes

Errors encounterable while parsing an option from bytes

Traits

Creates an iterator which gives the current opt’s number as well as the option.

Trait for getting the delta from either heap or heapless Opts

Get the runtime size (in bytes) of a struct

Trait for converting a sequence of bytes into some data structure

Trait allowing fallible conversion into bytes