pub enum HydroRoot {
ForEach {
f: DebugExpr,
input: Box<HydroNode>,
op_metadata: HydroIrOpMetadata,
},
SendExternal {
to_external_id: usize,
to_key: usize,
to_many: bool,
unpaired: bool,
serialize_fn: Option<DebugExpr>,
instantiate_fn: DebugInstantiate,
input: Box<HydroNode>,
op_metadata: HydroIrOpMetadata,
},
DestSink {
sink: DebugExpr,
input: Box<HydroNode>,
op_metadata: HydroIrOpMetadata,
},
CycleSink {
ident: Ident,
input: Box<HydroNode>,
op_metadata: HydroIrOpMetadata,
},
}Expand description
An root in a Hydro graph, which is an pipeline that doesn’t emit any downstream values. Traversals over the dataflow graph and generating DFIR IR start from roots.
Variants§
ForEach
SendExternal
DestSink
CycleSink
Implementations§
Source§impl HydroRoot
impl HydroRoot
pub fn compile_network<'a, D>(
&mut self,
compile_env: &D::CompileEnv,
extra_stmts: &mut BTreeMap<usize, Vec<Stmt>>,
seen_tees: &mut SeenTees,
processes: &HashMap<usize, D::Process>,
clusters: &HashMap<usize, D::Cluster>,
externals: &HashMap<usize, D::External>,
)where
D: Deploy<'a>,
Available on crate feature
build only.pub fn connect_network(&mut self, seen_tees: &mut SeenTees)
pub fn transform_bottom_up( &mut self, transform_root: &mut impl FnMut(&mut HydroRoot), transform_node: &mut impl FnMut(&mut HydroNode), seen_tees: &mut SeenTees, check_well_formed: bool, )
pub fn transform_children( &mut self, transform: impl FnMut(&mut HydroNode, &mut SeenTees), seen_tees: &mut SeenTees, )
pub fn deep_clone(&self, seen_tees: &mut SeenTees) -> HydroRoot
pub fn emit( &mut self, graph_builders: &mut dyn DfirBuilder, built_tees: &mut HashMap<*const RefCell<HydroNode>, Ident>, next_stmt_id: &mut usize, )
Available on crate feature
build only.pub fn emit_core( &mut self, builders_or_callback: &mut BuildersOrCallback<'_, impl FnMut(&mut HydroRoot, &mut usize), impl FnMut(&mut HydroNode, &mut usize)>, built_tees: &mut HashMap<*const RefCell<HydroNode>, Ident>, next_stmt_id: &mut usize, )
Available on crate feature
build only.pub fn op_metadata(&self) -> &HydroIrOpMetadata
pub fn op_metadata_mut(&mut self) -> &mut HydroIrOpMetadata
pub fn input(&self) -> &HydroNode
pub fn input_metadata(&self) -> &HydroIrMetadata
pub fn print_root(&self) -> String
pub fn visit_debug_expr(&mut self, transform: impl FnMut(&mut DebugExpr))
Source§impl HydroRoot
impl HydroRoot
Sourcepub fn build_graph_structure(
&self,
structure: &mut HydroGraphStructure,
seen_tees: &mut HashMap<*const RefCell<HydroNode>, usize>,
config: &HydroWriteConfig,
) -> usize
Available on crate feature viz only.
pub fn build_graph_structure( &self, structure: &mut HydroGraphStructure, seen_tees: &mut HashMap<*const RefCell<HydroNode>, usize>, config: &HydroWriteConfig, ) -> usize
viz only.Build the graph structure by traversing the IR tree.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HydroRoot
impl !RefUnwindSafe for HydroRoot
impl !Send for HydroRoot
impl !Sync for HydroRoot
impl Unpin for HydroRoot
impl !UnwindSafe for HydroRoot
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
Starts a [
SinkBuild] adaptor chain to send all items from self as a [Stream].