pub trait ConfigObject<V>: Sized + IntoIterator<Item = (String, V)> {
// Required methods
fn new() -> Self;
fn iter<'a>(&'a self) -> impl Iterator<Item = (&'a String, &'a V)>
where V: 'a;
fn get(&self, key: &str) -> Option<&V>;
fn get_mut(&mut self, key: &str) -> Option<&mut V>;
fn insert(&mut self, key: String, value: V);
}Expand description
An ordered object whose children have the same native value type.
Required Methods§
Sourcefn iter<'a>(&'a self) -> impl Iterator<Item = (&'a String, &'a V)>where
V: 'a,
fn iter<'a>(&'a self) -> impl Iterator<Item = (&'a String, &'a V)>where
V: 'a,
Iterate in input/insertion order.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".