aboutsummaryrefslogtreecommitdiff
path: root/chain/src/item/default/mod.rs
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2024-01-08 16:13:19 +0800
committerJSDurand <mmemmew@gmail.com>2024-01-08 16:13:19 +0800
commit3ae0cf9898485a2ec35df7d23cd274e7dea5796d (patch)
tree35acbd1223288eb6f62ab281b57845c0ce2ed1c5 /chain/src/item/default/mod.rs
parent55f7068e91182dfe458fad41c3251388ea461569 (diff)
a commit before the forst query
I think the main functionalities are already there, but the lack of querying capabilities makes this not very useful at the moment. This commit is right before an attempt to add this missing piece.
Diffstat (limited to 'chain/src/item/default/mod.rs')
-rw-r--r--chain/src/item/default/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/chain/src/item/default/mod.rs b/chain/src/item/default/mod.rs
index 01e463e..f532805 100644
--- a/chain/src/item/default/mod.rs
+++ b/chain/src/item/default/mod.rs
@@ -127,6 +127,11 @@ impl<T: GraphLabel> LabelGraph<T> for DefaultForest<T> {
where
Self: 'a;
+ type TupleIter<'a> = std::iter::Empty<(T, usize)>
+ where
+ Self: 'a,
+ T: 'a;
+
type LabelIter<'a> = std::iter::Empty<(&'a T, <Self as LabelGraph<T>>::Iter<'a>)>
where
Self: 'a,
@@ -163,6 +168,10 @@ impl<T: GraphLabel> LabelGraph<T> for DefaultForest<T> {
unimplemented!("edges have no labels")
}
+ fn tuples_of(&self, _node_id: usize) -> Result<Self::TupleIter<'_>, GError> {
+ unimplemented!("edges have no labels")
+ }
+
fn labels_of(&self, _node_id: usize) -> Result<Self::LabelIter<'_>, GError> {
unimplemented!("edges have no labels")
}