Skip to main content

ProdDfirBuilder

Struct ProdDfirBuilder 

Source
pub struct ProdDfirBuilder {
    pub graphs: SecondaryMap<LocationKey, FlatGraphBuilder>,
}
Available on crate feature build only.
Expand description

The production (deployment) DFIR builder: emits one DFIR graph per root location (process/cluster).

Tick and atomic locations are collapsed onto their root location’s graph. In the future (#2902), this builder will additionally emit each (unified) tick as a root-level loop {{ ... }} context within its root location’s graph.

Fields§

§graphs: SecondaryMap<LocationKey, FlatGraphBuilder>

The DFIR graph builder for each root location.

Trait Implementations§

Source§

impl Default for ProdDfirBuilder

Source§

fn default() -> ProdDfirBuilder

Returns the “default value” for a type. Read more
Source§

impl DfirBuilder for ProdDfirBuilder

Source§

fn singleton_intermediates(&self) -> bool

Whether the representation of singletons should include intermediate states.
Source§

fn add_dfir_at( &mut self, location: &LocationId, dfir: DfirCode, operator_tag: Option<&str>, )

Adds the DFIR statements to the graph for the given location. Read more
Source§

fn batch( &mut self, in_ident: Ident, in_location: &LocationId, in_kind: &CollectionKind, out_ident: &Ident, _out_location: &LocationId, _op_meta: &HydroIrOpMetadata, _fold_hooked_idents: &HashSet<String>, )

Source§

fn yield_from_tick( &mut self, in_ident: Ident, in_location: &LocationId, _in_kind: &CollectionKind, out_ident: &Ident, _out_location: &LocationId, )

Source§

fn begin_atomic( &mut self, in_ident: Ident, in_location: &LocationId, _in_kind: &CollectionKind, out_ident: &Ident, _out_location: &LocationId, _op_meta: &HydroIrOpMetadata, )

Source§

fn end_atomic( &mut self, in_ident: Ident, in_location: &LocationId, _in_kind: &CollectionKind, out_ident: &Ident, )

Source§

fn observe_nondet( &mut self, _trusted: bool, location: &LocationId, in_ident: Ident, _in_kind: &CollectionKind, out_ident: &Ident, _out_kind: &CollectionKind, _op_meta: &HydroIrOpMetadata, )

Source§

fn merge_ordered( &mut self, location: &LocationId, first_ident: Ident, second_ident: Ident, out_ident: &Ident, _in_kind: &CollectionKind, _op_meta: &HydroIrOpMetadata, operator_tag: Option<&str>, )

Source§

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>, _external_element_type: Option<&Type>, tag_id: StmtId, _networking_info: &NetworkingInfo, )

Source§

fn create_external_source( &mut self, on: &LocationId, source_expr: Expr, out_ident: &Ident, deserialize: Option<&DebugExpr>, tag_id: StmtId, )

Source§

fn create_external_output( &mut self, on: &LocationId, sink_expr: Expr, input_ident: &Ident, serialize: Option<&DebugExpr>, tag_id: StmtId, )

Source§

fn emit_fold_hook( &mut self, _location: &LocationId, _in_ident: &Ident, _in_kind: &CollectionKind, _op_meta: &HydroIrOpMetadata, ) -> Option<Ident>

Optionally emit a fold hook that buffers and permutes inputs before the fold. Returns the new input ident to use for the fold if a hook was emitted.
Source§

fn assert_is_consistent( &mut self, _trusted: bool, location: &LocationId, in_ident: Ident, out_ident: &Ident, )

Inserts necessary code to validate a manual assertion that at this point the input live collection is consistent. In production, this is a no-op, but in simulation this will (not yet implemented) inject assertions that validate consistency.
Source§

fn observe_for_mut( &mut self, location: &LocationId, in_ident: Ident, _in_kind: &CollectionKind, out_ident: &Ident, _op_meta: &HydroIrOpMetadata, )

Observes non-determinism introduced by a mut closure operating on a non-strict (unordered / at-least-once) input. In production this is identity; in simulation it delegates to observe_nondet with the strict output kind.
Source§

fn create_versioned_network_fork( &mut self, _channel_id: u32, _dest: &LocationId, _senders: Vec<(LocationId, Ident, Option<DebugExpr>)>, _external_element_type: Option<&Type>, _tag_id: StmtId, )

Source§

fn create_versioned_network( &mut self, _channel_id: u32, _source: &LocationId, _dest: &LocationId, _out_ident: &Ident, _deserialize: Option<&DebugExpr>, _external_element_type: Option<&Type>, _tag_id: StmtId, )

Source§

fn tick_state_lifetime(&self, _op_location: &LocationId) -> TokenStream

The DFIR persistence lifetime for operator state scoped to a single tick, for an operator at op_location. Read more
Source§

fn cross_tick_state_lifetime(&self, _op_location: &LocationId) -> TokenStream

The DFIR persistence lifetime for operator state that accumulates across ticks, for an operator at op_location. 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
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToSinkBuild for T

§

fn iter_to_sink_build(self) -> SendIterBuild<Self>
where Self: Sized + Iterator,

Starts a [SinkBuild] adaptor chain to send all items from self as an Iterator.
§

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].
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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