Trait OptionInsertExt

Source
pub trait OptionInsertExt {
    // Required method
    fn insert_option<'a, T>(
        &mut self,
        key: OptionKey<T>,
        value: T,
    ) -> Result<(), Error>
       where T: Into<OptionValue<'a>>;
}
Expand description

Extension class for additional helper methods for OptionInsertExt.

Required Methods§

Source

fn insert_option<'a, T>( &mut self, key: OptionKey<T>, value: T, ) -> Result<(), Error>
where T: Into<OptionValue<'a>>,

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<O> OptionInsertExt for O
where O: OptionInsert + ?Sized,