pub trait NetworkConfig<T>: RawConfig<Ctx = T> {
// Required methods
fn get<K>(&self, key: K) -> Option<&T>
where K: AsRef<str>;
fn get_mut<K>(&mut self, key: K) -> Option<&mut T>
where K: AsRef<str>;
fn set<K>(&mut self, key: K, value: T) -> Option<T>
where K: AsRef<str>;
fn remove<K>(&mut self, key: K) -> Option<T>
where K: AsRef<str>;
fn contains<K>(&self, key: K) -> bool
where K: AsRef<str>;
fn keys(&self) -> Vec<String>;
}Expand description
The NetworkConfig trait extends the RawConfig trait to provide a more robust
interface for neural network configurations.
Required Methods§
fn get<K>(&self, key: K) -> Option<&T>
fn get_mut<K>(&mut self, key: K) -> Option<&mut T>
fn set<K>(&mut self, key: K, value: T) -> Option<T>
fn remove<K>(&mut self, key: K) -> Option<T>
fn contains<K>(&self, key: K) -> bool
fn keys(&self) -> Vec<String>
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.