pub struct StreamRuleEngine { /* private fields */ }Expand description
Holds stream rule engine application-layer state or configuration. Use it with the documented coordinator methods; run, journal, event, provider, or port effects are called out on those methods rather than on construction.
Implementations§
Source§impl StreamRuleEngine
impl StreamRuleEngine
Sourcepub fn new(rules: Vec<StreamRule>) -> Result<Self, AgentError>
pub fn new(rules: Vec<StreamRule>) -> Result<Self, AgentError>
Creates a new application::stream value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn restore(
rules: Vec<StreamRule>,
state: StreamRuleEngineState,
) -> Result<Self, AgentError>
pub fn restore( rules: Vec<StreamRule>, state: StreamRuleEngineState, ) -> Result<Self, AgentError>
Builds the restore value. This is data construction and performs no I/O, journal append, event publication, or process work.
Sourcepub fn rules(&self) -> &[StreamRule]
pub fn rules(&self) -> &[StreamRule]
Returns the rules currently held by this value. This clones current stream-rule engine state for inspection without reading hidden payloads.
Sourcepub fn snapshot_state(&self) -> StreamRuleEngineState
pub fn snapshot_state(&self) -> StreamRuleEngineState
Returns the snapshot state currently held by this value. This clones current stream-rule engine state for inspection without reading hidden payloads.
Sourcepub fn repeat_state_for(
&self,
rule: &StreamRule,
) -> StreamRuleRepeatStateSnapshot
pub fn repeat_state_for( &self, rule: &StreamRule, ) -> StreamRuleRepeatStateSnapshot
Returns repeat state for derived from the supplied state. This uses only local coordinator state and performs no hidden host work.
Sourcepub fn observe_delta(
&mut self,
delta: StreamDelta,
) -> Result<Vec<StreamIntervention>, AgentError>
pub fn observe_delta( &mut self, delta: StreamDelta, ) -> Result<Vec<StreamIntervention>, AgentError>
Observe delta. This updates stream-rule repeat tracking from one observed delta and returns the resulting intervention.
Trait Implementations§
Source§impl Clone for StreamRuleEngine
impl Clone for StreamRuleEngine
Source§fn clone(&self) -> StreamRuleEngine
fn clone(&self) -> StreamRuleEngine
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more