pub struct SemanticTrigger {Show 14 fields
pub id: String,
pub name: String,
pub description: String,
pub query: String,
pub embedding: Option<Vec<f32>>,
pub threshold: f32,
pub action: TriggerAction,
pub enabled: bool,
pub priority: i32,
pub max_fires_per_window: Option<usize>,
pub rate_limit_window_secs: Option<u64>,
pub tags: Vec<String>,
pub metadata: HashMap<String, String>,
pub created_at: f64,
}Expand description
A semantic trigger definition
Fields§
§id: StringUnique trigger identifier
name: StringHuman-readable name
description: StringDescription of what this trigger matches
query: StringQuery/pattern that defines the trigger
embedding: Option<Vec<f32>>Embedding of the query (for ANN matching)
threshold: f32Similarity threshold (0.0 to 1.0)
action: TriggerActionAction to take when triggered
enabled: boolWhether this trigger is active
priority: i32Priority (lower = higher priority)
max_fires_per_window: Option<usize>Maximum fires per time window (rate limiting)
rate_limit_window_secs: Option<u64>Time window for rate limiting (seconds)
Tags for categorization
metadata: HashMap<String, String>Metadata
created_at: f64Created timestamp
Trait Implementations§
Source§impl Clone for SemanticTrigger
impl Clone for SemanticTrigger
Source§fn clone(&self) -> SemanticTrigger
fn clone(&self) -> SemanticTrigger
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SemanticTrigger
impl RefUnwindSafe for SemanticTrigger
impl Send for SemanticTrigger
impl Sync for SemanticTrigger
impl Unpin for SemanticTrigger
impl UnwindSafe for SemanticTrigger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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