pub trait Extensions: Copy + Into<NodeIndex> {
// Provided methods
fn extensions(&self, graph: &Graph) -> Vec<&str> { ... }
fn get_extension<T: Extension>(&self, graph: &Graph) -> Option<T> { ... }
fn add_extension<T: Extension>(&self, graph: &mut Graph, ext: T) { ... }
fn remove_extension(&self, graph: &mut Graph, name: &'static str) { ... }
fn create_extension<T: Extension>(&self, graph: &mut Graph) -> T { ... }
}Expand description
An object that can have extensions.
Provided Methods§
fn extensions(&self, graph: &Graph) -> Vec<&str>
fn get_extension<T: Extension>(&self, graph: &Graph) -> Option<T>
fn add_extension<T: Extension>(&self, graph: &mut Graph, ext: T)
fn remove_extension(&self, graph: &mut Graph, name: &'static str)
fn create_extension<T: Extension>(&self, graph: &mut Graph) -> T
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".