pub enum HydroLeaf {
ForEach {
f: DebugExpr,
input: Box<HydroNode>,
metadata: HydroIrMetadata,
},
DestSink {
sink: DebugExpr,
input: Box<HydroNode>,
metadata: HydroIrMetadata,
},
CycleSink {
ident: Ident,
location_kind: LocationId,
input: Box<HydroNode>,
metadata: HydroIrMetadata,
},
}
Expand description
An leaf 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 leaves.
Variants§
Implementations§
Source§impl HydroLeaf
impl HydroLeaf
pub fn compile_network<'a, D: Deploy<'a>>( &mut self, compile_env: &D::CompileEnv, seen_tees: &mut SeenTees, seen_tee_locations: &mut SeenTeeLocations, processes: &HashMap<usize, D::Process>, clusters: &HashMap<usize, D::Cluster>, externals: &HashMap<usize, D::ExternalProcess>, )
pub fn connect_network(&mut self, seen_tees: &mut SeenTees)
pub fn transform_bottom_up( &mut self, transform_leaf: &mut impl FnMut(&mut HydroLeaf), transform_node: &mut impl FnMut(&mut HydroNode), seen_tees: &mut SeenTees, )
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) -> HydroLeaf
pub fn emit( &mut self, graph_builders: &mut BTreeMap<usize, FlatGraphBuilder>, built_tees: &mut HashMap<*const RefCell<HydroNode>, (Ident, usize)>, next_stmt_id: &mut usize, )
pub fn emit_core( &mut self, builders_or_callback: &mut BuildersOrCallback<'_, impl FnMut(&mut HydroLeaf, &mut usize), impl FnMut(&mut HydroNode, &mut usize)>, built_tees: &mut HashMap<*const RefCell<HydroNode>, (Ident, usize)>, next_stmt_id: &mut usize, )
pub fn metadata(&self) -> &HydroIrMetadata
pub fn metadata_mut(&mut self) -> &mut HydroIrMetadata
pub fn print_root(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HydroLeaf
impl !RefUnwindSafe for HydroLeaf
impl !Send for HydroLeaf
impl !Sync for HydroLeaf
impl Unpin for HydroLeaf
impl !UnwindSafe for HydroLeaf
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