pub struct DataflowLayout {
pub inputs: HashSet<Uuid>,
pub outputs: HashSet<Uuid>,
pub queries: HashSet<Uuid>,
pub queryables: HashSet<Uuid>,
pub labels: HashMap<Uuid, String>,
pub nodes: HashMap<Uuid, HashSet<Uuid>>,
}
Expand description
Represents a flattened dataflow layout
Fields§
§inputs: HashSet<Uuid>
Inputs present in the dataflow
outputs: HashSet<Uuid>
Outputs present in the dataflow
queries: HashSet<Uuid>
Queries present in the dataflow
queryables: HashSet<Uuid>
Queryables present in the dataflow
labels: HashMap<Uuid, String>
Labels for nodes and IO, useful for debugging and visualization
nodes: HashMap<Uuid, HashSet<Uuid>>
Nodes representation with their IO, useful for debugging and visualization
Implementations§
Source§impl DataflowLayout
impl DataflowLayout
Sourcepub fn new() -> DataflowLayout
pub fn new() -> DataflowLayout
Creates a new empty dataflow layout
Sourcepub async fn node<T>(
&mut self,
label: impl Into<String>,
builder_function: impl AsyncFnOnce(&mut NodeIOBuilder) -> T,
) -> (NodeLayout, T)
pub async fn node<T>( &mut self, label: impl Into<String>, builder_function: impl AsyncFnOnce(&mut NodeIOBuilder) -> T, ) -> (NodeLayout, T)
Adds a new node to the dataflow layout, providing its label and a builder function for its IO. For convenience, the node layout is returned, together with the result of the builder function.
Sourcepub fn label(&self, uuid: impl Into<Uuid>) -> String
pub fn label(&self, uuid: impl Into<Uuid>) -> String
Access the label of an entity in the dataflow layout (node, input, output, query, queryable)
Sourcepub fn build(self) -> Arc<DataflowLayout>
pub fn build(self) -> Arc<DataflowLayout>
Build the dataflow layout by making it immutable and returning an Arc
Trait Implementations§
Source§impl Debug for DataflowLayout
impl Debug for DataflowLayout
Source§impl Default for DataflowLayout
impl Default for DataflowLayout
Source§fn default() -> DataflowLayout
fn default() -> DataflowLayout
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DataflowLayout
impl RefUnwindSafe for DataflowLayout
impl Send for DataflowLayout
impl Sync for DataflowLayout
impl Unpin for DataflowLayout
impl UnwindSafe for DataflowLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more