Trait stack_graphs::stitching::ForwardCandidates
source · pub trait ForwardCandidates<H, A, Db, Err>where
A: Appendable,
Db: ToAppendable<H, A>,{
// Required methods
fn get_forward_candidates<R>(&mut self, path: &PartialPath, result: &mut R)
where R: Extend<H>;
fn get_joining_candidate_degree(&self, path: &PartialPath) -> Degree;
fn get_graph_partials_and_db(
&mut self,
) -> (&StackGraph, &mut PartialPaths, &Db);
// Provided method
fn load_forward_candidates(
&mut self,
_path: &PartialPath,
_cancellation_flag: &dyn CancellationFlag,
) -> Result<(), Err> { ... }
}
Expand description
A trait to support finding candidates for partial path extension. The candidates are represented
by handles H
, which are mapped to appendables A
using the database Db
. Loading errors are
reported as values of the Err
type.
Required Methods§
sourcefn get_forward_candidates<R>(&mut self, path: &PartialPath, result: &mut R)where
R: Extend<H>,
fn get_forward_candidates<R>(&mut self, path: &PartialPath, result: &mut R)where
R: Extend<H>,
Get forward candidates for extending the given partial path and add them to the provided result instance. If this instance loads data lazily, this only considers previously loaded data.
sourcefn get_joining_candidate_degree(&self, path: &PartialPath) -> Degree
fn get_joining_candidate_degree(&self, path: &PartialPath) -> Degree
Get the number of available candidates that share the given path’s end node.
sourcefn get_graph_partials_and_db(&mut self) -> (&StackGraph, &mut PartialPaths, &Db)
fn get_graph_partials_and_db(&mut self) -> (&StackGraph, &mut PartialPaths, &Db)
Get the graph, partial path arena, and database backing this candidates instance.
Provided Methods§
sourcefn load_forward_candidates(
&mut self,
_path: &PartialPath,
_cancellation_flag: &dyn CancellationFlag,
) -> Result<(), Err>
fn load_forward_candidates( &mut self, _path: &PartialPath, _cancellation_flag: &dyn CancellationFlag, ) -> Result<(), Err>
Load possible forward candidates for the given partial path into this candidates instance.
Must be called before [get_forward_candidates
] to allow lazy-loading implementations.
Object Safety§
This trait is not object safe.