pub trait DagAlgorithm: Send + Sync {
Show 30 methods
// Required methods
fn sort<'life0, 'life1, 'async_trait>(
&'life0 self,
set: &'life1 NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn parent_names<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
) -> Pin<Box<dyn Future<Output = Result<Vec<VertexName>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn master_group<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn children<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn range<'life0, 'async_trait>(
&'life0 self,
roots: NameSet,
heads: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn descendants<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dirty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_vertex_lazy(&self) -> bool;
fn dag_snapshot(&self) -> Result<Arc<dyn DagAlgorithm + Send + Sync>>;
fn dag_id(&self) -> &str;
fn dag_version(&self) -> &VerLink;
// Provided methods
fn beautify<'life0, 'async_trait>(
&'life0 self,
main_branch: Option<NameSet>,
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn subdag<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn parents<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn first_ancestor_nth<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<VertexName>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn first_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn heads<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn roots<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn merges<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn gca_one<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<Option<VertexName>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn gca_all<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn common_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn is_ancestor<'life0, 'async_trait>(
&'life0 self,
ancestor: VertexName,
descendant: VertexName,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn heads_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn only<'life0, 'async_trait>(
&'life0 self,
reachable: NameSet,
unreachable: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn only_both<'life0, 'async_trait>(
&'life0 self,
reachable: NameSet,
unreachable: NameSet,
) -> Pin<Box<dyn Future<Output = Result<(NameSet, NameSet)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn reachable_roots<'life0, 'async_trait>(
&'life0 self,
roots: NameSet,
heads: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn id_dag_snapshot(&self) -> Result<Arc<dyn IdDagAlgorithm + Send + Sync>> { ... }
}Expand description
DAG related read-only algorithms.
Required Methods§
Sourcefn sort<'life0, 'life1, 'async_trait>(
&'life0 self,
set: &'life1 NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sort<'life0, 'life1, 'async_trait>(
&'life0 self,
set: &'life1 NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sort a NameSet topologically.
The returned set should have dag and id_map hints set to associated
with this dag or its previous compatible version. For example, if a
set is sorted on another dag but not in this dag, it should be resorted
using this dag. If a set is empty and not associated to the current
dag in its hints, the return value should be a different empty set
that has the dag and id_map hints set to this dag.
Sourcefn parent_names<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
) -> Pin<Box<dyn Future<Output = Result<Vec<VertexName>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn parent_names<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
) -> Pin<Box<dyn Future<Output = Result<Vec<VertexName>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get ordered parent vertexes.
Sourcefn all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a set that covers all vertexes tracked by this DAG.
Sourcefn master_group<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn master_group<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a set that covers all vertexes in the master group.
Sourcefn ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates all ancestors reachable from any name from the given set.
Sourcefn children<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn children<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates children of the given set.
Sourcefn range<'life0, 'async_trait>(
&'life0 self,
roots: NameSet,
heads: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn range<'life0, 'async_trait>(
&'life0 self,
roots: NameSet,
heads: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates the “dag range” - vertexes reachable from both sides.
Sourcefn descendants<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn descendants<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates the descendants of the given set.
Sourcefn dirty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dirty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vertexes buffered in memory, not yet written to disk.
Sourcefn is_vertex_lazy(&self) -> bool
fn is_vertex_lazy(&self) -> bool
Returns true if the vertex names might need to be resolved remotely.
Sourcefn dag_snapshot(&self) -> Result<Arc<dyn DagAlgorithm + Send + Sync>>
fn dag_snapshot(&self) -> Result<Arc<dyn DagAlgorithm + Send + Sync>>
Get a snapshot of the current graph that can operate separately.
This makes it easier to fight with borrowck.
Sourcefn dag_version(&self) -> &VerLink
fn dag_version(&self) -> &VerLink
Version of the dag. Useful to figure out compatibility between two dags.
Provided Methods§
Sourcefn beautify<'life0, 'async_trait>(
&'life0 self,
main_branch: Option<NameSet>,
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn beautify<'life0, 'async_trait>(
&'life0 self,
main_branch: Option<NameSet>,
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Re-create the graph so it looks better when rendered.
Sourcefn subdag<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subdag<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Extract a sub graph containing only specified vertexes.
Sourcefn parents<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn parents<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates parents of the given set.
Note: Parent order is not preserved. Use [NameDag::parent_names]
to preserve order.
Sourcefn first_ancestor_nth<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<VertexName>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn first_ancestor_nth<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<VertexName>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates the n-th first ancestor.
Sourcefn first_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn first_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates ancestors but only follows the first parent.
Sourcefn heads<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn heads<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates heads of the given set.
Sourcefn roots<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn roots<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates roots of the given set.
Sourcefn merges<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn merges<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates merges of the selected set (vertexes with >=2 parents).
Sourcefn gca_one<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<Option<VertexName>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn gca_one<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<Option<VertexName>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates one “greatest common ancestor” of the given set.
If there are no common ancestors, return None.
If there are multiple greatest common ancestors, pick one arbitrarily.
Use gca_all to get all of them.
Sourcefn gca_all<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn gca_all<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates all “greatest common ancestor“s of the given set.
gca_one is faster if an arbitrary answer is ok.
Sourcefn common_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn common_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates all common ancestors of the given set.
Sourcefn is_ancestor<'life0, 'async_trait>(
&'life0 self,
ancestor: VertexName,
descendant: VertexName,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_ancestor<'life0, 'async_trait>(
&'life0 self,
ancestor: VertexName,
descendant: VertexName,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Tests if ancestor is an ancestor of descendant.
Sourcefn heads_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn heads_ancestors<'life0, 'async_trait>(
&'life0 self,
set: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates “heads” of the ancestors of the given set. That is,
Find Y, which is the smallest subset of set X, where ancestors(Y) is
ancestors(X).
This is faster than calculating heads(ancestors(set)) in certain
implementations like segmented changelog.
This is different from heads. In case set contains X and Y, and Y is
an ancestor of X, but not the immediate ancestor, heads will include
Y while this function won’t.
Sourcefn only<'life0, 'async_trait>(
&'life0 self,
reachable: NameSet,
unreachable: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn only<'life0, 'async_trait>(
&'life0 self,
reachable: NameSet,
unreachable: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates ancestors(reachable) - ancestors(unreachable).
Sourcefn only_both<'life0, 'async_trait>(
&'life0 self,
reachable: NameSet,
unreachable: NameSet,
) -> Pin<Box<dyn Future<Output = Result<(NameSet, NameSet)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn only_both<'life0, 'async_trait>(
&'life0 self,
reachable: NameSet,
unreachable: NameSet,
) -> Pin<Box<dyn Future<Output = Result<(NameSet, NameSet)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates ancestors(reachable) - ancestors(unreachable), and
ancestors(unreachable).
This might be faster in some implementations than calculating only and
ancestors separately.
Sourcefn reachable_roots<'life0, 'async_trait>(
&'life0 self,
roots: NameSet,
heads: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reachable_roots<'life0, 'async_trait>(
&'life0 self,
roots: NameSet,
heads: NameSet,
) -> Pin<Box<dyn Future<Output = Result<NameSet>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates roots that are reachable from heads without going
through other roots. For example, given the following graph:
F
|\
C E
| |
B D
|/
Areachable_roots(roots=[A, B, C], heads=[F]) returns [A, C].
B is not included because it cannot be reached without going
through another root C from F. A is included because it
can be reached via F -> E -> D -> A that does not go through
other roots.
The can be calculated as
roots & (heads | parents(only(heads, roots & ancestors(heads)))).
Actual implementation might have faster paths.
The roots & ancestors(heads) portion filters out bogus roots for
compatibility, if the callsite does not provide bogus roots, it
could be simplified to just roots.
Sourcefn id_dag_snapshot(&self) -> Result<Arc<dyn IdDagAlgorithm + Send + Sync>>
fn id_dag_snapshot(&self) -> Result<Arc<dyn IdDagAlgorithm + Send + Sync>>
Get a snapshot of the IdDag that can operate separately.
This is for advanced use-cases. For example, if callsite wants to do some graph calculation without network, and control how to batch the vertex name lookups precisely.
Trait Implementations§
Source§impl DagAlgorithm for &(dyn DagAlgorithm + Send + Sync)
impl DagAlgorithm for &(dyn DagAlgorithm + Send + Sync)
Source§fn sort<'a: 'c, 'b: 'c, 'c>(
&'a self,
set: &'b Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 'c>>where
Self: 'c,
fn sort<'a: 'c, 'b: 'c, 'c>(
&'a self,
set: &'b Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 'c>>where
Self: 'c,
NameSet topologically. Read moreSource§fn parent_names<'a: 'c, 'c>(
&'a self,
name: Vertex,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vertex>>> + Send + 'c>>where
Self: 'c,
fn parent_names<'a: 'c, 'c>(
&'a self,
name: Vertex,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vertex>>> + Send + 'c>>where
Self: 'c,
Source§fn all<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn all<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn master_group<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn master_group<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn first_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn first_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn parents<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn parents<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn merges<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn merges<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn first_ancestor_nth<'a: 's, 's>(
&'a self,
name: Vertex,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Vertex>>> + Send + 's>>where
Self: 's,
fn first_ancestor_nth<'a: 's, 's>(
&'a self,
name: Vertex,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Vertex>>> + Send + 's>>where
Self: 's,
Source§fn heads<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn heads<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn children<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn children<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn roots<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn roots<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn gca_one<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Option<Vertex>>> + Send + 's>>where
Self: 's,
fn gca_one<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Option<Vertex>>> + Send + 's>>where
Self: 's,
Source§fn gca_all<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn gca_all<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
gca_one is faster if an arbitrary answer is ok.Source§fn common_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn common_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn is_ancestor<'a: 's, 's>(
&'a self,
ancestor: Vertex,
descendant: Vertex,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 's>>where
Self: 's,
fn is_ancestor<'a: 's, 's>(
&'a self,
ancestor: Vertex,
descendant: Vertex,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 's>>where
Self: 's,
ancestor is an ancestor of descendant.Source§fn heads_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn heads_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
ancestors(Y) is
ancestors(X). Read moreSource§fn range<'a: 's, 's>(
&'a self,
roots: Set,
heads: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn range<'a: 's, 's>(
&'a self,
roots: Set,
heads: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn only<'a: 's, 's>(
&'a self,
reachable: Set,
unreachable: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn only<'a: 's, 's>(
&'a self,
reachable: Set,
unreachable: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
ancestors(reachable) - ancestors(unreachable).Source§fn only_both<'a: 's, 's>(
&'a self,
reachable: Set,
unreachable: Set,
) -> Pin<Box<dyn Future<Output = Result<(Set, Set)>> + Send + 's>>where
Self: 's,
fn only_both<'a: 's, 's>(
&'a self,
reachable: Set,
unreachable: Set,
) -> Pin<Box<dyn Future<Output = Result<(Set, Set)>> + Send + 's>>where
Self: 's,
ancestors(reachable) - ancestors(unreachable), and
ancestors(unreachable).
This might be faster in some implementations than calculating only and
ancestors separately.Source§fn descendants<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn descendants<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn reachable_roots<'a: 's, 's>(
&'a self,
roots: Set,
heads: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn reachable_roots<'a: 's, 's>(
&'a self,
roots: Set,
heads: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
roots that are reachable from heads without going
through other roots. For example, given the following graph: Read moreSource§fn dirty<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn dirty<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
Source§fn is_vertex_lazy(&self) -> bool
fn is_vertex_lazy(&self) -> bool
Source§fn dag_snapshot(&self) -> Result<Arc<dyn DagAlgorithm + Send + Sync>>
fn dag_snapshot(&self) -> Result<Arc<dyn DagAlgorithm + Send + Sync>>
Source§fn id_dag_snapshot(&self) -> Result<Arc<dyn IdDagAlgorithm + Send + Sync>>
fn id_dag_snapshot(&self) -> Result<Arc<dyn IdDagAlgorithm + Send + Sync>>
IdDag that can operate separately. Read moreSource§fn dag_version(&self) -> &VerLink
fn dag_version(&self) -> &VerLink
Source§impl Parents for &(dyn DagAlgorithm + Send + Sync)
impl Parents for &(dyn DagAlgorithm + Send + Sync)
fn parent_names<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
) -> Pin<Box<dyn Future<Output = Result<Vec<VertexName>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn hint_subdag_for_insertion<'life0, 'life1, 'async_trait>(
&'life0 self,
heads: &'life1 [VertexName],
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn hint_subdag_for_insertion<'life0, 'life1, 'async_trait>(
&'life0 self,
heads: &'life1 [VertexName],
) -> Pin<Box<dyn Future<Output = Result<MemNameDag>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
heads. Read moreImplementations on Foreign Types§
Source§impl DagAlgorithm for Arc<dyn DagAlgorithm + Send + Sync>
impl DagAlgorithm for Arc<dyn DagAlgorithm + Send + Sync>
fn sort<'a: 'c, 'b: 'c, 'c>(
&'a self,
set: &'b Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 'c>>where
Self: 'c,
fn parent_names<'a: 'c, 'c>(
&'a self,
name: Vertex,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vertex>>> + Send + 'c>>where
Self: 'c,
fn all<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn master_group<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn first_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn parents<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn merges<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn first_ancestor_nth<'a: 's, 's>(
&'a self,
name: Vertex,
n: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Vertex>>> + Send + 's>>where
Self: 's,
fn heads<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn children<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn roots<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn gca_one<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Option<Vertex>>> + Send + 's>>where
Self: 's,
fn gca_all<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn common_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn is_ancestor<'a: 's, 's>(
&'a self,
ancestor: Vertex,
descendant: Vertex,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 's>>where
Self: 's,
fn heads_ancestors<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn range<'a: 's, 's>(
&'a self,
roots: Set,
heads: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn only<'a: 's, 's>(
&'a self,
reachable: Set,
unreachable: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn only_both<'a: 's, 's>(
&'a self,
reachable: Set,
unreachable: Set,
) -> Pin<Box<dyn Future<Output = Result<(Set, Set)>> + Send + 's>>where
Self: 's,
fn descendants<'a: 's, 's>(
&'a self,
set: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn reachable_roots<'a: 's, 's>(
&'a self,
roots: Set,
heads: Set,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn dirty<'a: 's, 's>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<Set>> + Send + 's>>where
Self: 's,
fn is_vertex_lazy(&self) -> bool
fn dag_snapshot(&self) -> Result<Arc<dyn DagAlgorithm + Send + Sync>>
fn id_dag_snapshot(&self) -> Result<Arc<dyn IdDagAlgorithm + Send + Sync>>
fn dag_id(&self) -> &str
fn dag_version(&self) -> &VerLink
Implementors§
impl DagAlgorithm for &(dyn DagAlgorithm + Send + Sync)
impl<IS, M, P, S> DagAlgorithm for AbstractNameDag<IdDag<IS>, M, P, S>
DAG related read-only algorithms.