diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/async_dag.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/async_dag.rs b/src/async_dag.rs index 88a839e..85b1f9e 100644 --- a/src/async_dag.rs +++ b/src/async_dag.rs @@ -65,6 +65,10 @@ impl<Id, N, Backend> AsyncDag<Id, N, Backend> .ok_or_else(|| anyhow!("Node not found")) } + pub fn head(&self) -> &Id { + &self.head + } + /// Check whether an `id` is in the DAG. pub async fn has_id(&self, id: &Id) -> Result<bool> { self.stream() |