Trait toad::ToCoapValue
source · pub trait ToCoapValue {
// Required method
fn to_coap_value<T: Array<Item = u8>>(self) -> T;
}
Expand description
Something that can be stored in a CoAP Option.
These include:
- strings (str and String)
- empty (
()
) - unsigned integers (
u8
,u16
,u32
,u64
) - bytes (anything that impls [
toad_common::Array
])
Required Methods§
sourcefn to_coap_value<T: Array<Item = u8>>(self) -> T
fn to_coap_value<T: Array<Item = u8>>(self) -> T
Convert the value