logo
pub trait GraphNodesNominalInterface {
    type NodeHandle: NodeBasicInterface;

    fn node<Id>(&self, id: Id) -> &Self::NodeHandle
    where
        Id: Into<<<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id>
; fn out_nodes_ids<'a, 'b, Id>(
        &'a self,
        node_id: Id
    ) -> Box<dyn Iterator<Item = <<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id> + 'b>
    where
        Id: Into<<<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id>,
        'a: 'b
; fn NodeId<Id>(
        id: Id
    ) -> <<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id
    where
        Id: Into<<<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id>
, { ... } fn node_id<Id>(
        &self,
        id: Id
    ) -> <<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id
    where
        Id: Into<<<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id>
, { ... } fn out_nodes<'a, 'b, Id>(
        &'a self,
        node_id: Id
    ) -> Box<dyn Iterator<Item = (<<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id, &<Self as GraphNodesNominalInterface>::NodeHandle)> + 'b>
    where
        Id: Into<<<Self as GraphNodesNominalInterface>::NodeHandle as HasId>::Id>,
        'a: 'b
, { ... } }
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 a node - entity representing a node or the node itself. It’s not always possible to operate a node directly, for example it it has to be wrapped by cell ref. For that use NodeHandle. Otherwise NodeHandle could be &Node.

Required Methods

Get node with id.

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

Provided Methods

Convert argument into node id.

Convert argument into node id.

Iterate over neighbourhood of the node. Callback gets ids and reference on itself of nodes in neighbourhood of a picked node.

Implementors