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

Fields

§location_kind: LocationId
§

CycleSource

Fields

§ident: Ident
§location_kind: LocationId
§

Tee

Fields

§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

Fields

§

FlatMap

Fields

§

Filter

Fields

§

FilterMap

Fields

§

DeferTick(Box<HydroNode>)

§

Enumerate

Fields

§is_static: bool
§

Inspect

Fields

§

Unique(Box<HydroNode>)

§

Sort(Box<HydroNode>)

§

Fold

Fields

§

FoldKeyed

Fields

§

Reduce

Fields

§

ReduceKeyed

Fields

§

Network

Fields

§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>

Implementations§

source§

impl<'a> HydroNode

source

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>, )

source

pub fn connect_network(&mut self, seen_tees: &mut SeenTees)

source

pub fn transform_bottom_up<C>( &mut self, transform: impl FnMut(&mut HydroNode, &mut C) + Copy, seen_tees: &mut SeenTees, ctx: &mut C, )

source

pub fn transform_children( &mut self, transform: impl FnMut(&mut HydroNode, &mut SeenTees), seen_tees: &mut SeenTees, )

source

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§

source§

impl Debug for HydroNode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> MinOrder<T> for T

source§

type Min = T

The weaker of the two orderings.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more