Trait NamedGraph

Source
pub trait NamedGraph<'i> {
    type NameRef;
    type NameMut;

    // Required methods
    fn get_node_name(&'i self, node: usize) -> Option<Self::NameRef>;
    fn mut_node_name(&'i mut self, node: usize) -> Option<Self::NameMut>;
    fn set_node_name(&'i mut self, node: usize, name: &str);
    fn get_edge_name<Q>(&'i self, edge: Q) -> Option<Self::NameRef>
       where Q: Into<EdgeQuery>;
    fn mut_edge_name<Q>(&'i mut self, edge: Q) -> Option<Self::NameMut>
       where Q: Into<EdgeQuery>;
    fn set_edge_name<Q>(&'i mut self, edge: Q, name: &str)
       where Q: Into<EdgeQuery>;
}
Expand description

Labeling a graph can provide Weight information

§Examples

use graph_theory::GraphEngine;

Required Associated Types§

Source

type NameRef

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;
Source

type NameMut

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;

Required Methods§

Source

fn get_node_name(&'i self, node: usize) -> Option<Self::NameRef>

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;
Source

fn mut_node_name(&'i mut self, node: usize) -> Option<Self::NameMut>

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;
Source

fn set_node_name(&'i mut self, node: usize, name: &str)

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;
Source

fn get_edge_name<Q>(&'i self, edge: Q) -> Option<Self::NameRef>
where Q: Into<EdgeQuery>,

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;
Source

fn mut_edge_name<Q>(&'i mut self, edge: Q) -> Option<Self::NameMut>
where Q: Into<EdgeQuery>,

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;
Source

fn set_edge_name<Q>(&'i mut self, edge: Q, name: &str)
where Q: Into<EdgeQuery>,

Remove edge by given edge-id or start and end node-id.

§Panics
  • No such ability

Not all graph engine supports insert edge.

§Examples
use graph_theory::GraphEngine;

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§