pub trait DfirBuilder {
// Required methods
fn get_dfir_mut(&mut self, location: &LocationId) -> &mut FlatGraphBuilder;
fn batch(
&mut self,
in_ident: Ident,
in_location: &LocationId,
_in_kind: &CollectionKind,
out_ident: &Ident,
out_location: &LocationId,
op_meta: &HydroIrOpMetadata,
);
fn yield_from_tick(
&mut self,
in_ident: Ident,
in_location: &LocationId,
in_kind: &CollectionKind,
out_ident: &Ident,
);
fn observe_nondet(
&mut self,
location: &LocationId,
in_ident: Ident,
in_kind: &CollectionKind,
out_ident: &Ident,
out_kind: &CollectionKind,
);
fn create_network(
&mut self,
from: &LocationId,
to: &LocationId,
input_ident: Ident,
out_ident: &Ident,
serialize: &Option<DebugExpr>,
sink: Expr,
source: Expr,
deserialize: &Option<DebugExpr>,
tag_id: usize,
);
fn create_external_source(
&mut self,
on: &LocationId,
source_expr: Expr,
out_ident: &Ident,
deserialize: &Option<DebugExpr>,
tag_id: usize,
);
fn create_external_output(
&mut self,
on: &LocationId,
sink_expr: Expr,
input_ident: &Ident,
serialize: &Option<DebugExpr>,
tag_id: usize,
);
}
Available on crate feature
build
only.Expand description
A trait that abstracts over elements of DFIR code-gen that differ between production deployment and simulations.
In particular, this lets the simulator fuse together all locations into one DFIR graph, spit out separate graphs for each tick, and emit hooks for controlling non-deterministic operators.
Required Methods§
Sourcefn get_dfir_mut(&mut self, location: &LocationId) -> &mut FlatGraphBuilder
fn get_dfir_mut(&mut self, location: &LocationId) -> &mut FlatGraphBuilder
Gets the DFIR builder for the given location, creating it if necessary.