Skip to main content

Extensions

Trait Extensions 

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

Source

fn extensions(&self, graph: &Graph) -> Vec<&str>

Source

fn get_extension<T: Extension>(&self, graph: &Graph) -> Option<T>

Source

fn add_extension<T: Extension>(&self, graph: &mut Graph, ext: T)

Source

fn remove_extension(&self, graph: &mut Graph, name: &'static str)

Source

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".

Implementors§