pub trait RandomAccessGraph: RandomAccessLabeling<Label = usize> + SequentialGraph {
// Provided methods
fn successors(
&self,
node_id: usize,
) -> <Self as RandomAccessLabeling>::Labels<'_> { ... }
fn labels(
&self,
_node_id: usize,
) -> <Self as RandomAccessLabeling>::Labels<'_>
where for<'a> this_method_cannot_be_called_use_successors_instead: Clone { ... }
fn has_arc(&self, src_node_id: usize, dst_node_id: usize) -> bool { ... }
}Expand description
A sequential graph providing, additionally, random access to successor lists.
On such a graph, successors are returned by the
successors method rather than by the
labels method.
Provided Methods§
Sourcefn successors(
&self,
node_id: usize,
) -> <Self as RandomAccessLabeling>::Labels<'_>
fn successors( &self, node_id: usize, ) -> <Self as RandomAccessLabeling>::Labels<'_>
Returns the successors of a node.
Note that this is just a convenience alias of the
RandomAccessLabeling::labels method, which is overridden in this
trait by an unimplemented, uncallable version.
This approach avoids that users might call labels expecting to get
just the labels associated with a node.
Sourcefn labels(&self, _node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>where
for<'a> this_method_cannot_be_called_use_successors_instead: Clone,
fn labels(&self, _node_id: usize) -> <Self as RandomAccessLabeling>::Labels<'_>where
for<'a> this_method_cannot_be_called_use_successors_instead: Clone,
Disabling override of the RandomAccessLabeling::labels method.
The where clause of this override contains an unsatisfiable private trait bound,
which makes calling this method impossible. Use the RandomAccessGraph::successors method instead.
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.