pub struct EventTriggeredScoringEngine { /* private fields */ }Expand description
Main event-triggered scoring engine
Implementations§
Source§impl EventTriggeredScoringEngine
impl EventTriggeredScoringEngine
Sourcepub fn new(config: TriggerConfig) -> Self
pub fn new(config: TriggerConfig) -> Self
Create new event-triggered scoring engine
Sourcepub fn with_default_config() -> Self
pub fn with_default_config() -> Self
Create with default configuration
Sourcepub async fn analyze_content(
&self,
content: &str,
original_importance: f64,
user_id: Option<&str>,
) -> Result<TriggerDetectionResult>
pub async fn analyze_content( &self, content: &str, original_importance: f64, user_id: Option<&str>, ) -> Result<TriggerDetectionResult>
Analyze content for trigger patterns with immediate processing
Sourcepub async fn update_config(&self, new_config: TriggerConfig) -> Result<()>
pub async fn update_config(&self, new_config: TriggerConfig) -> Result<()>
Update configuration (hot-reloadable)
Sourcepub async fn get_metrics(&self) -> TriggerMetrics
pub async fn get_metrics(&self) -> TriggerMetrics
Get current metrics
Sourcepub async fn reset_metrics(&self) -> Result<()>
pub async fn reset_metrics(&self) -> Result<()>
Reset metrics
Sourcepub async fn add_user_customization(
&self,
user_id: String,
customizations: HashMap<TriggerEvent, TriggerPattern>,
) -> Result<()>
pub async fn add_user_customization( &self, user_id: String, customizations: HashMap<TriggerEvent, TriggerPattern>, ) -> Result<()>
Add user-specific customization
Auto Trait Implementations§
impl Freeze for EventTriggeredScoringEngine
impl !RefUnwindSafe for EventTriggeredScoringEngine
impl Send for EventTriggeredScoringEngine
impl Sync for EventTriggeredScoringEngine
impl Unpin for EventTriggeredScoringEngine
impl !UnwindSafe for EventTriggeredScoringEngine
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> 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