Trait rs_graph::attributed::Attributes
[−]
[src]
pub trait Attributes {
type Node: Node;
type Edge: Edge;
type GraphAttr;
type NodeAttr;
type EdgeAttr;
fn attr(&self) -> &Self::GraphAttr;
fn attr_mut(&mut self) -> &mut Self::GraphAttr;
fn node(&self, u: Self::Node) -> &Self::NodeAttr;
fn node_mut(&mut self, u: Self::Node) -> &mut Self::NodeAttr;
fn edge(&self, e: Self::Edge) -> &Self::EdgeAttr;
fn edge_mut(&mut self, e: Self::Edge) -> &mut Self::EdgeAttr;
}This trait provides (mutable) access to the attributes of an attributed graph.
A structure implementing this trait is returned as the second
value by the split method of an attributed graph.
Associated Types
type Node: Node
Type of nodes of the associated graph.
type Edge: Edge
Type of edges of the associated graph.
type GraphAttr
Type of graph attributes.
type NodeAttr
Type of node attributes.
type EdgeAttr
Type of edge attributes.
Required Methods
fn attr(&self) -> &Self::GraphAttr
Return the graph attributes.
fn attr_mut(&mut self) -> &mut Self::GraphAttr
Return the graph attributes.
fn node(&self, u: Self::Node) -> &Self::NodeAttr
Return the attributes of a node.
fn node_mut(&mut self, u: Self::Node) -> &mut Self::NodeAttr
Return the attributes of a node.
fn edge(&self, e: Self::Edge) -> &Self::EdgeAttr
Return the attributes of an edge.
fn edge_mut(&mut self, e: Self::Edge) -> &mut Self::EdgeAttr
Return the attributes of an edge.
Implementors
impl<'a, G, Gx, Nx, Ex, Ax> Attributes for GraphAttrs<'a, G, Gx, Nx, Ex, Ax> where
G: IndexGraph<'a>, type Node = G::Node; type Edge = G::Edge; type GraphAttr = Gx; type NodeAttr = Nx; type EdgeAttr = Ex;