pub enum StreamMatcher {
Literal {
text: String,
case_sensitive: bool,
window_bytes: u64,
},
Regex {
pattern: String,
dialect: RegexDialect,
window_bytes: u64,
timeout_ms: u64,
},
Marker {
marker_id: MarkerId,
marker_version: MarkerVersion,
},
HostMatcher {
matcher_ref: MatcherEngineRef,
risk_policy_ref: Option<PolicyRef>,
},
}Expand description
Enumerates the finite stream matcher cases. Serialized names are part of the SDK contract; update fixtures when variants change.
Variants§
Literal
Use this variant when the contract needs to represent literal; selecting it has no side effect by itself.
Fields
Regex
Use this variant when the contract needs to represent regex; selecting it has no side effect by itself.
Fields
pattern: StringSearch pattern supplied by the caller. The grep executor compiles it under regex and output bounds before reading files.
dialect: RegexDialectSchema dialect used to interpret the output schema. Validators use it to select the supported JSON-schema subset and compatibility rules.
Marker
Use this variant when the contract needs to represent marker; selecting it has no side effect by itself.
Fields
marker_version: MarkerVersionVersion string for this capability, package, or protocol surface. Use it for compatibility checks during package or adapter resolution.
HostMatcher
Use this variant when the contract needs to represent host matcher; selecting it has no side effect by itself.
Fields
matcher_ref: MatcherEngineRefTyped matcher ref reference. Resolving or executing it is a separate policy-gated step.
Implementations§
Source§impl StreamMatcher
impl StreamMatcher
Sourcepub fn literal(
text: impl Into<String>,
case_sensitive: bool,
window_bytes: u64,
) -> Self
pub fn literal( text: impl Into<String>, case_sensitive: bool, window_bytes: u64, ) -> Self
Builds the literal value with the documented defaults. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn regex_with_limits(
pattern: impl Into<String>,
window_bytes: u64,
timeout_ms: u64,
) -> Self
pub fn regex_with_limits( pattern: impl Into<String>, window_bytes: u64, timeout_ms: u64, ) -> Self
Builds the regex with limits value with the documented defaults. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn marker(marker_id: impl Into<String>) -> Self
pub fn marker(marker_id: impl Into<String>) -> Self
Marker. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn window_bytes(&self) -> u64
pub fn window_bytes(&self) -> u64
Builds the window bytes value with the documented defaults. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn kind_name(&self) -> &'static str
pub fn kind_name(&self) -> &'static str
Returns the kind name currently held by this value. 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 StreamMatcher
impl Clone for StreamMatcher
Source§fn clone(&self) -> StreamMatcher
fn clone(&self) -> StreamMatcher
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 StreamMatcher
impl Debug for StreamMatcher
Source§impl<'de> Deserialize<'de> for StreamMatcher
impl<'de> Deserialize<'de> for StreamMatcher
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 StreamMatcher
impl PartialEq for StreamMatcher
Source§fn eq(&self, other: &StreamMatcher) -> bool
fn eq(&self, other: &StreamMatcher) -> bool
self and other values to be equal, and is used by ==.