Trait NetworkConfig

Source
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§

Source

fn get<K>(&self, key: K) -> Option<&T>
where K: AsRef<str>,

Source

fn get_mut<K>(&mut self, key: K) -> Option<&mut T>
where K: AsRef<str>,

Source

fn set<K>(&mut self, key: K, value: T) -> Option<T>
where K: AsRef<str>,

Source

fn remove<K>(&mut self, key: K) -> Option<T>
where K: AsRef<str>,

Source

fn contains<K>(&self, key: K) -> bool
where K: AsRef<str>,

Source

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.

Implementors§