pub trait GraphView {
Show 14 methods
// Required methods
fn nodes_ordered(&self) -> Vec<&str>;
fn get_node_index(&self, node: &str) -> Option<usize>;
fn get_node_name(&self, index: usize) -> Option<&str>;
fn neighbors_iter(
&self,
node: &str,
) -> Option<Box<dyn Iterator<Item = &str> + '_>>;
fn in_neighbors_iter(
&self,
node: &str,
) -> Option<Box<dyn Iterator<Item = &str> + '_>>;
fn neighbor_count(&self, node: &str) -> usize;
fn edge_weight(
&self,
source: &str,
target: &str,
weight_attr: Option<&str>,
) -> f64;
fn has_node(&self, node: &str) -> bool;
fn has_edge(&self, u: &str, v: &str) -> bool;
fn is_directed(&self) -> bool;
fn node_count(&self) -> usize;
fn edge_count(&self) -> usize;
// Provided methods
fn neighbors_indices(&self, _node_idx: usize) -> Option<&[usize]> { ... }
fn edge_weight_by_indices(
&self,
source_idx: usize,
target_idx: usize,
weight_attr: Option<&str>,
) -> f64 { ... }
}Required Methods§
fn nodes_ordered(&self) -> Vec<&str>
fn get_node_index(&self, node: &str) -> Option<usize>
fn get_node_name(&self, index: usize) -> Option<&str>
fn neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>
fn in_neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>
fn neighbor_count(&self, node: &str) -> usize
fn edge_weight( &self, source: &str, target: &str, weight_attr: Option<&str>, ) -> f64
fn has_node(&self, node: &str) -> bool
fn has_edge(&self, u: &str, v: &str) -> bool
fn is_directed(&self) -> bool
fn node_count(&self) -> usize
fn edge_count(&self) -> usize
Provided Methods§
fn neighbors_indices(&self, _node_idx: usize) -> Option<&[usize]>
fn edge_weight_by_indices( &self, source_idx: usize, target_idx: usize, weight_attr: Option<&str>, ) -> f64
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".