pub struct PriorityEventProcessor<M: Message> { /* private fields */ }Expand description
Priority-aware event processor
Implementations§
Source§impl<M: Message> PriorityEventProcessor<M>
impl<M: Message> PriorityEventProcessor<M>
Sourcepub fn with_config(config: PriorityConfig) -> Self
pub fn with_config(config: PriorityConfig) -> Self
Create a new priority event processor with custom configuration
Sourcepub fn stats(&self) -> EventStats
pub fn stats(&self) -> EventStats
Get current statistics
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset statistics
Sourcepub fn advanced_metrics(&self) -> AdvancedEventStats
pub fn advanced_metrics(&self) -> AdvancedEventStats
Get advanced metrics snapshot
Sourcepub fn metrics_collector(&self) -> Arc<MetricsCollector>
pub fn metrics_collector(&self) -> Arc<MetricsCollector>
Get metrics collector for external monitoring
Sourcepub fn enable_auto_scaling(&mut self, config: AutoScaleConfig)
pub fn enable_auto_scaling(&mut self, config: AutoScaleConfig)
Enable auto-scaling with the given configuration
Sourcepub fn disable_auto_scaling(&mut self)
pub fn disable_auto_scaling(&mut self)
Disable auto-scaling
Sourcepub fn resize_queue(&self, new_size: usize) -> Result<(), ResizeError>
pub fn resize_queue(&self, new_size: usize) -> Result<(), ResizeError>
Manually resize the queue
Sourcepub fn queue_capacity(&self) -> usize
pub fn queue_capacity(&self) -> usize
Get current queue capacity
Sourcepub fn queue_size(&self) -> usize
pub fn queue_size(&self) -> usize
Get the current queue size
Sourcepub fn process_events(
&self,
message_rx: &Receiver<Event<M>>,
crossterm_rx: &Receiver<CrosstermEvent>,
tick_rate: Duration,
) -> Option<Event<M>>
pub fn process_events( &self, message_rx: &Receiver<Event<M>>, crossterm_rx: &Receiver<CrosstermEvent>, tick_rate: Duration, ) -> Option<Event<M>>
Process events from multiple sources with priority handling
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for PriorityEventProcessor<M>
impl<M> !RefUnwindSafe for PriorityEventProcessor<M>
impl<M> Send for PriorityEventProcessor<M>
impl<M> Sync for PriorityEventProcessor<M>
impl<M> Unpin for PriorityEventProcessor<M>
impl<M> !UnwindSafe for PriorityEventProcessor<M>
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> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter