pub struct StreamRule {
pub id: StreamRuleId,
pub version: RuleVersion,
pub source: SourceRef,
pub matcher: StreamMatcher,
pub channels: Vec<StreamChannelSelector>,
pub scope: StreamRuleScope,
pub action: StreamAction,
pub repeat: RepeatPolicy,
pub privacy: MatchPrivacyPolicy,
pub policy_refs: Vec<PolicyRef>,
}Expand description
Carries the stream rule record payload for journal, event, or fixture surfaces. Creating or cloning it only preserves serialized SDK state; append, publish, replay, or export effects are documented on the runtime and port methods that store it.
Fields§
§id: StreamRuleIdStable identifier for this record.
version: RuleVersionVersion string for this capability, package, or protocol surface. Use it for compatibility checks during package or adapter resolution.
source: SourceRefSource label or ref for this item; it is metadata and does not fetch content by itself.
matcher: StreamMatcherMatcher used by this record or request.
channels: Vec<StreamChannelSelector>Collection of channels values. Ordering and membership should be treated as part of the serialized contract when relevant.
scope: StreamRuleScopeScope used by this record or request.
action: StreamActionAction used by this record or request.
repeat: RepeatPolicyRepeat used by this record or request.
privacy: MatchPrivacyPolicyPrivacy class used for projection, telemetry, and raw-content access decisions.
policy_refs: Vec<PolicyRef>Policy references that govern admission, projection, execution, or delivery.
Implementations§
Source§impl StreamRule
impl StreamRule
Sourcepub fn builder(id: StreamRuleId) -> StreamRuleBuilder
pub fn builder(id: StreamRuleId) -> StreamRuleBuilder
Starts a builder for this records::stream value. Building is data-only; runtime side effects occur only when a later coordinator or host port executes the built configuration.
Sourcepub fn mask_regex(
id: impl Into<String>,
pattern: impl Into<String>,
) -> StreamRuleBuilder
pub fn mask_regex( id: impl Into<String>, pattern: impl Into<String>, ) -> StreamRuleBuilder
Returns an updated value with mask regex configured. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn validate(&self) -> Result<(), AgentError>
pub fn validate(&self) -> Result<(), AgentError>
Validates the records::stream invariants and returns a typed error on failure. Validation is pure and does not perform I/O, dispatch, journal appends, or adapter calls.
Trait Implementations§
Source§impl Clone for StreamRule
impl Clone for StreamRule
Source§fn clone(&self) -> StreamRule
fn clone(&self) -> StreamRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamRule
impl Debug for StreamRule
Source§impl<'de> Deserialize<'de> for StreamRule
impl<'de> Deserialize<'de> for StreamRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for StreamRule
impl PartialEq for StreamRule
Source§fn eq(&self, other: &StreamRule) -> bool
fn eq(&self, other: &StreamRule) -> bool
self and other values to be equal, and is used by ==.