logo
pub trait GraphEdgesNominalInterface: GraphNodesNominalInterface {
    type EdgeHandle: EdgeBasicInterface;

    fn edge<Id>(&self, id: Id) -> &Self::EdgeHandle
    where
        Id: Into<<Self::EdgeHandle as HasId>::Id>
; fn out_edges_ids<'a, 'b, IntoId>(
        &'a self,
        node_id: IntoId
    ) -> Box<dyn Iterator<Item = <Self::EdgeHandle as HasId>::Id> + 'b, Global>
    where
        'a: 'b,
        IntoId: Into<<Self::NodeHandle as HasId>::Id>
; fn EdgeId<Id>(id: Id) -> <Self::EdgeHandle as HasId>::Id
    where
        Id: Into<<Self::EdgeHandle as HasId>::Id>
, { ... } fn edge_id<Id>(&self, id: Id) -> <Self::EdgeHandle as HasId>::Id
    where
        Id: Into<<Self::EdgeHandle as HasId>::Id>
, { ... } fn out_edges<'a, 'b, IntoId>(
        &'a self,
        node_id: IntoId
    ) -> Box<dyn Iterator<Item = (<Self::EdgeHandle as HasId>::Id, &'a Self::EdgeHandle)> + 'b, Global>
    where
        'a: 'b,
        IntoId: Into<<Self::NodeHandle as HasId>::Id>
, { ... } }
Expand description

Graph which know how to iterate neighbourhood of a node and capable to convert id of a node into a node.

Required Associated Types

Handle of an edge - entity representing an edge or the edge itself. It’s not always possible to operate an edge directly, for example it it has to be wrapped by cell ref. For that use NodeHandle. Otherwise EdgeHandle could be &Node.

Required Methods

Get edge with id.

Iterate over output edges of the node. Callback gets ids of nodes in neighbourhood of a picked node.

Provided Methods

Convert argument into edge id.

Convert argument into edge id.

Iterate over output edges of the node. Callback gets ids and references of edges in neighbourhood of a picked node.

Implementors