pub struct BehaviorPattern {
pub id: PatternId,
pub version: u32,
pub description: String,
pub rule: PatternRule,
pub confidence_delta: f32,
pub conclude: bool,
}Expand description
One immutable behaviour pattern.
Fields§
§id: PatternIdStable pattern identifier.
version: u32Monotonic pattern version; higher versions replace older registry entries.
description: StringHuman-readable pattern description.
rule: PatternRuleSignal rule used to match investigations.
confidence_delta: f32Confidence delta applied when the pattern matches.
conclude: boolWhether a match should request conclusion of the investigation loop.
Implementations§
Source§impl BehaviorPattern
impl BehaviorPattern
Sourcepub fn new(
id: impl Into<String>,
version: u32,
rule: PatternRule,
delta: f32,
) -> Self
pub fn new( id: impl Into<String>, version: u32, rule: PatternRule, delta: f32, ) -> Self
Build a behavior pattern with an empty description.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Attach a human-readable description.
Sourcepub fn concluding(self) -> Self
pub fn concluding(self) -> Self
Mark this pattern as requesting a conclude action on match.
Trait Implementations§
Source§impl Clone for BehaviorPattern
impl Clone for BehaviorPattern
Source§fn clone(&self) -> BehaviorPattern
fn clone(&self) -> BehaviorPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BehaviorPattern
impl Debug for BehaviorPattern
Source§impl<'de> Deserialize<'de> for BehaviorPattern
impl<'de> Deserialize<'de> for BehaviorPattern
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoContextItem for BehaviorPattern
impl IntoContextItem for BehaviorPattern
Source§fn to_context_item(&self) -> ContextItem
fn to_context_item(&self) -> ContextItem
Project this resource record into a prompt-ready context item.
Auto Trait Implementations§
impl Freeze for BehaviorPattern
impl RefUnwindSafe for BehaviorPattern
impl Send for BehaviorPattern
impl Sync for BehaviorPattern
impl Unpin for BehaviorPattern
impl UnsafeUnpin for BehaviorPattern
impl UnwindSafe for BehaviorPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more