async_flow/model/system_definition.rs
1// This is free and unencumbered software released into the public domain.
2
3use super::{InputId, OutputId, SystemBuilder};
4use alloc::collections::BTreeSet;
5
6/// A system definition.
7#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
8pub struct SystemDefinition {
9 //pub(crate) blocks: Vec<BlockDefinition>,
10 pub(crate) connections: BTreeSet<(OutputId, InputId)>,
11 pub(crate) registered_outputs: BTreeSet<OutputId>,
12 pub(crate) registered_inputs: BTreeSet<InputId>,
13}
14
15impl SystemDefinition {
16 /// Returns a system builder.
17 pub fn build() -> SystemBuilder {
18 SystemBuilder::new()
19 }
20}