Starting support for tags

This commit is contained in:
2026-03-18 16:38:23 +01:00
parent 3cdc0e613a
commit 4aef173c7c
5 changed files with 296 additions and 1 deletions

View File

@ -11,6 +11,7 @@ use crate::stream::StreamConsumer;
use crate::stream::StreamProducer;
use crate::stream::StreamReader;
use crate::stream::StreamWriter;
use crate::tag::Tag;
#[derive(Default)]
pub struct Edge
@ -82,6 +83,7 @@ impl AnonymousStreamConsumer
pub struct In<T>
{
stream: Option<StreamConsumer<T>>,
tag_stream: Option<StreamConsumer<Tag>>,
// Will rarely be accessed
edge: Arc<Mutex<Edge>>,
@ -90,6 +92,7 @@ pub struct In<T>
pub struct Out<T>
{
stream: Option<StreamProducer<T>>,
tag_stream: Option<StreamProducer<Tag>>,
// Will rarely be accessed
edge: Arc<Mutex<Edge>>,
@ -101,9 +104,14 @@ pub fn stream<T>() -> (Out<T>, In<T>)
(
Out {
stream: None,
tag_stream: None,
edge: edge.clone(),
},
In { stream: None, edge },
In {
stream: None,
tag_stream: None,
edge,
},
)
}