pub trait GraphNodesNominalInterface {
type NodeHandle: NodeBasicInterface;
// Required methods
fn node<Id>(&self, id: Id) -> &Self::NodeHandle
where Id: Into<<Self::NodeHandle as HasId>::Id>;
fn out_nodes_ids<'a, 'b, Id>(
&'a self,
node_id: Id,
) -> Box<dyn Iterator<Item = <Self::NodeHandle as HasId>::Id> + 'b>
where 'a: 'b,
Id: Into<<Self::NodeHandle as HasId>::Id>;
// Provided methods
fn NodeId<Id>(id: Id) -> <Self::NodeHandle as HasId>::Id
where Id: Into<<Self::NodeHandle as HasId>::Id> { ... }
fn node_id<Id>(&self, id: Id) -> <Self::NodeHandle as HasId>::Id
where Id: Into<<Self::NodeHandle as HasId>::Id> { ... }
fn out_nodes<'a, 'b, Id>(
&'a self,
node_id: Id,
) -> Box<dyn Iterator<Item = (<Self::NodeHandle as HasId>::Id, &'a Self::NodeHandle)> + 'b>
where 'a: 'b,
Id: 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§
Sourcetype NodeHandle: NodeBasicInterface
type NodeHandle: NodeBasicInterface
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§
Sourcefn node<Id>(&self, id: Id) -> &Self::NodeHandle
fn node<Id>(&self, id: Id) -> &Self::NodeHandle
Get node with id.
Sourcefn out_nodes_ids<'a, 'b, Id>(
&'a self,
node_id: Id,
) -> Box<dyn Iterator<Item = <Self::NodeHandle as HasId>::Id> + 'b>
fn out_nodes_ids<'a, 'b, Id>( &'a self, node_id: Id, ) -> Box<dyn Iterator<Item = <Self::NodeHandle as HasId>::Id> + 'b>
Iterate over neighbourhood of the node. Callback gets ids of nodes in neighbourhood of a picked node.
Provided Methods§
Sourcefn NodeId<Id>(id: Id) -> <Self::NodeHandle as HasId>::Id
fn NodeId<Id>(id: Id) -> <Self::NodeHandle as HasId>::Id
Convert argument into node id.
Sourcefn node_id<Id>(&self, id: Id) -> <Self::NodeHandle as HasId>::Id
fn node_id<Id>(&self, id: Id) -> <Self::NodeHandle as HasId>::Id
Convert argument into node id.
Sourcefn out_nodes<'a, 'b, Id>(
&'a self,
node_id: Id,
) -> Box<dyn Iterator<Item = (<Self::NodeHandle as HasId>::Id, &'a Self::NodeHandle)> + 'b>
fn out_nodes<'a, 'b, Id>( &'a self, node_id: Id, ) -> Box<dyn Iterator<Item = (<Self::NodeHandle as HasId>::Id, &'a Self::NodeHandle)> + 'b>
Iterate over neighbourhood of the node. Callback gets ids and reference on itself of nodes in neighbourhood of a picked node.
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.