[][src]Trait async_coap::option::OptionInsert

pub trait OptionInsert {
    fn insert_option_with_bytes(
        &mut self,
        key: OptionNumber,
        value: &[u8]
    ) -> Result<(), Error>; fn insert_option_empty(&mut self, key: OptionNumber) -> Result<(), Error> { ... }
fn insert_option_with_str(
        &mut self,
        key: OptionNumber,
        value: &str
    ) -> Result<(), Error> { ... }
fn insert_option_with_u32(
        &mut self,
        key: OptionNumber,
        value: u32
    ) -> Result<(), Error> { ... } }

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>

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.

Loading content...

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>

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>

Inserts an option into the message with an integer value. Calling this method with out-of-order keys will incur a significant performance penalty.

Loading content...

Implementors

impl OptionInsert for NullMessageWrite[src]

impl OptionInsert for VecMessageEncoder[src]

impl<'buf> OptionInsert for BufferMessageEncoder<'buf>[src]

Loading content...