Skip to main content

Injector

Trait Injector 

Source
pub trait Injector {
    // Required method
    fn set(&mut self, key: &str, value: String);
}
Expand description

Injector provides an interface for adding fields from an underlying struct like HashMap

Required Methods§

Source

fn set(&mut self, key: &str, value: String)

Add a key and value to the underlying data.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S: BuildHasher> Injector for HashMap<String, String, S>

Source§

fn set(&mut self, key: &str, value: String)

Set a key and value in the HashMap.

Implementors§