[−][src]Trait async_coap::option::OptionInsert
Trait for types that allow you to insert CoAP options into them.
Required methods
fn insert_option_with_bytes(
&mut self,
key: OptionNumber,
value: &[u8]
) -> Result<(), Error>
&mut self,
key: OptionNumber,
value: &[u8]
) -> Result<(), Error>
Inserts an option into the message with the given bytes as the value. Calling this method with out-of-order keys will incur a significant performance penalty.
Provided methods
fn insert_option_empty(&mut self, key: OptionNumber) -> Result<(), Error>
Inserts an option into the message with no value. Calling this method with out-of-order keys will incur a significant performance penalty.
fn insert_option_with_str(
&mut self,
key: OptionNumber,
value: &str
) -> Result<(), Error>
&mut self,
key: OptionNumber,
value: &str
) -> Result<(), Error>
Inserts an option into the message with a string value. Calling this method with out-of-order keys will incur a significant performance penalty.
fn insert_option_with_u32(
&mut self,
key: OptionNumber,
value: u32
) -> Result<(), Error>
&mut self,
key: OptionNumber,
value: u32
) -> Result<(), Error>
Inserts an option into the message with an integer value. Calling this method with out-of-order keys will incur a significant performance penalty.
Implementors
impl OptionInsert for NullMessageWrite
[src]
fn insert_option_with_bytes(
&mut self,
_key: OptionNumber,
_value: &[u8]
) -> Result<(), Error>
[src]
&mut self,
_key: OptionNumber,
_value: &[u8]
) -> Result<(), Error>
impl OptionInsert for VecMessageEncoder
[src]
fn insert_option_with_bytes(
&mut self,
key: OptionNumber,
value: &[u8]
) -> Result<(), Error>
[src]
&mut self,
key: OptionNumber,
value: &[u8]
) -> Result<(), Error>
impl<'buf> OptionInsert for BufferMessageEncoder<'buf>
[src]
fn insert_option_with_bytes(
&mut self,
key: OptionNumber,
value: &[u8]
) -> Result<(), Error>
[src]
&mut self,
key: OptionNumber,
value: &[u8]
) -> Result<(), Error>