pub struct SignalRouter { /* private fields */ }Expand description
High-performance signal router with deduplication and priority queuing.
Implementations§
Source§impl SignalRouter
impl SignalRouter
pub fn new(max_queue_size: usize) -> Self
pub fn with_policy( max_queue_size: usize, policy: Box<dyn AttentionPolicy>, ) -> Self
Sourcepub fn ingest(
&mut self,
signal: RuntimeSignal,
is_running: bool,
) -> SignalDisposition
pub fn ingest( &mut self, signal: RuntimeSignal, is_running: bool, ) -> SignalDisposition
Ingest a signal. Returns the disposition after dedup + attention evaluation.
Queue dispositions are buffered; if the queue is full, returns Dropped
so the SDK can apply backpressure or surface the loss to telemetry.
All other dispositions are returned directly to the caller.
Sourcepub fn next(&mut self) -> Option<RuntimeSignal>
pub fn next(&mut self) -> Option<RuntimeSignal>
Pull next queued signal.
Sourcepub fn clear_dedup(&mut self)
pub fn clear_dedup(&mut self)
Clear the dedup set (call at session boundaries to prevent unbounded growth).
Auto Trait Implementations§
impl !RefUnwindSafe for SignalRouter
impl !UnwindSafe for SignalRouter
impl Freeze for SignalRouter
impl Send for SignalRouter
impl Sync for SignalRouter
impl Unpin for SignalRouter
impl UnsafeUnpin for SignalRouter
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