Enum hydro_lang::ir::HydroNode
source · pub enum HydroNode {
Show 27 variants
Placeholder,
Source {
source: HydroSource,
location_kind: LocationId,
},
CycleSource {
ident: Ident,
location_kind: LocationId,
},
Tee {
inner: TeeNode,
},
Persist(Box<HydroNode>),
Unpersist(Box<HydroNode>),
Delta(Box<HydroNode>),
Chain(Box<HydroNode>, Box<HydroNode>),
CrossProduct(Box<HydroNode>, Box<HydroNode>),
CrossSingleton(Box<HydroNode>, Box<HydroNode>),
Join(Box<HydroNode>, Box<HydroNode>),
Difference(Box<HydroNode>, Box<HydroNode>),
AntiJoin(Box<HydroNode>, Box<HydroNode>),
Map {
f: DebugExpr,
input: Box<HydroNode>,
},
FlatMap {
f: DebugExpr,
input: Box<HydroNode>,
},
Filter {
f: DebugExpr,
input: Box<HydroNode>,
},
FilterMap {
f: DebugExpr,
input: Box<HydroNode>,
},
DeferTick(Box<HydroNode>),
Enumerate {
is_static: bool,
input: Box<HydroNode>,
},
Inspect {
f: DebugExpr,
input: Box<HydroNode>,
},
Unique(Box<HydroNode>),
Sort(Box<HydroNode>),
Fold {
init: DebugExpr,
acc: DebugExpr,
input: Box<HydroNode>,
},
FoldKeyed {
init: DebugExpr,
acc: DebugExpr,
input: Box<HydroNode>,
},
Reduce {
f: DebugExpr,
input: Box<HydroNode>,
},
ReduceKeyed {
f: DebugExpr,
input: Box<HydroNode>,
},
Network {
from_location: LocationId,
from_key: Option<usize>,
to_location: LocationId,
to_key: Option<usize>,
serialize_fn: Option<DebugExpr>,
instantiate_fn: DebugInstantiate,
deserialize_fn: Option<DebugExpr>,
input: Box<HydroNode>,
},
}
Expand description
An intermediate node in a Hydro graph, which consumes data from upstream nodes and emits data to downstream nodes.
Variants§
Placeholder
Source
CycleSource
Tee
Persist(Box<HydroNode>)
Unpersist(Box<HydroNode>)
Delta(Box<HydroNode>)
Chain(Box<HydroNode>, Box<HydroNode>)
CrossProduct(Box<HydroNode>, Box<HydroNode>)
CrossSingleton(Box<HydroNode>, Box<HydroNode>)
Join(Box<HydroNode>, Box<HydroNode>)
Difference(Box<HydroNode>, Box<HydroNode>)
AntiJoin(Box<HydroNode>, Box<HydroNode>)
Map
FlatMap
Filter
FilterMap
DeferTick(Box<HydroNode>)
Enumerate
Inspect
Unique(Box<HydroNode>)
Sort(Box<HydroNode>)
Fold
FoldKeyed
Reduce
ReduceKeyed
Network
Implementations§
source§impl<'a> HydroNode
impl<'a> HydroNode
pub fn compile_network<D: Deploy<'a>>( &mut self, compile_env: &D::CompileEnv, seen_tees: &mut SeenTees, nodes: &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<C>( &mut self, transform: impl FnMut(&mut HydroNode, &mut C) + Copy, seen_tees: &mut SeenTees, ctx: &mut C, )
pub fn transform_children( &mut self, transform: impl FnMut(&mut HydroNode, &mut SeenTees), seen_tees: &mut SeenTees, )
pub fn emit( &self, graph_builders: &mut BTreeMap<usize, FlatGraphBuilder>, built_tees: &mut HashMap<*const RefCell<HydroNode>, (Ident, usize)>, next_stmt_id: &mut usize, ) -> (Ident, usize)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HydroNode
impl !RefUnwindSafe for HydroNode
impl !Send for HydroNode
impl !Sync for HydroNode
impl Unpin for HydroNode
impl !UnwindSafe for HydroNode
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> ⓘ
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