pub struct SharedDataLayout {
pub data: Arc<Mutex<DataLayout>>,
pub debug: Arc<Mutex<DebugLayout>>,
}
Expand description
Represents a shared Data
only layout. It is used to construct
a DataflowLayout
easily.
Fields§
§data: Arc<Mutex<DataLayout>>
§debug: Arc<Mutex<DebugLayout>>
Implementations§
Sourcepub async fn node<T>(
&self,
label: impl Into<String>,
layout_builder: impl AsyncFnOnce(&mut NodeLayout) -> T,
) -> (NodeID, T)
pub async fn node<T>( &self, label: impl Into<String>, layout_builder: impl AsyncFnOnce(&mut NodeLayout) -> T, ) -> (NodeID, T)
Creates a new Node
with the given label. Provide an async
closure
to add primitives to the node (such as Inputs, Queries etc…)
Sourcepub async fn finish(
self,
flows: impl AsyncFnOnce(&mut FlowLayout) -> Result<(), Report>,
) -> Result<Arc<DataflowLayout>, Report>
pub async fn finish( self, flows: impl AsyncFnOnce(&mut FlowLayout) -> Result<(), Report>, ) -> Result<Arc<DataflowLayout>, Report>
Creates a DataflowLayout
from the current SharedDataLayout
and the given
flows
function. The flows
function is an async
closure that takes a
FlowLayout
that can be used to connect the primitives together.
Trait Implementations§
Source§fn clone(&self) -> SharedDataLayout
fn clone(&self) -> SharedDataLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
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