[−][src]Module handlegraph::handlegraph
Traits for immutable access to a HandleGraph, including its nodes/handles, edges, and the sequences of nodes.
With the exception of HandleGraph
and HandleGraphRef
, each of
these traits are centered on providing iterators to one specific
part of a graph. For instance, IntoNeighbors
gives access to
the neighbors of a handle, using the associated type Neighbors: Iterator<Item = Handle>
.
Most of the methods that define the immutable part of the handlegraph behavior have default implementations in terms of these iterators, though it may be desirable to provide specific implementations in some cases.
The methods on the iterator traits often take self
, rather than
&self
, because the iterators are expected to borrow (part of)
the graph, which means the associated types in the concrete
implementations will include lifetimes, and at this time the only
way to do that is by using a lifetime that's part of the trait's
implementing type.
For this reason, you won't actually implement IntoHandles
for
PackedGraph
, but rather for
&'a PackedGraph
.
The HandleGraphRef
trait is provided to make it more convenient
to write generic functions using any subset of the handlegraph
behaviors.
Re-exports
pub use self::iter::*; |
Modules
iter | This module defines some utility iterators that make it easier to
implement the iterator-centric traits in the
|
Traits
HandleGraph | The base |
HandleGraphRef | Trait collecting all immutable trait bounds. |
IntoEdges | Access all the edges in the graph as an iterator, and related and querying the graph for number of edges. |
IntoEdgesPar | Parallel access to all the edges in the graph. |
IntoHandles | Access all the handles in the graph as an iterator, and querying the graph for number of nodes, and presence of a node by ID. |
IntoHandlesPar | Parallel access to all the handles in the graph. |
IntoNeighbors | Access to the neighbors of handles in the graph, and querying the graph for a node's degree. |
IntoSequences | Access to the sequence of any node, and related methods such as retrieving subsequences, individual bases, and node lengths. |