pub struct ResonanceScheduler { /* private fields */ }Expand description
Schedules resonance processing respecting attention budgets
Implementations§
Source§impl ResonanceScheduler
impl ResonanceScheduler
pub fn new(config: &SchedulingConfig) -> Self
Sourcepub async fn schedule(&self, task: ResonanceTask) -> ScheduleHandle
pub async fn schedule(&self, task: ResonanceTask) -> ScheduleHandle
Schedule a resonance task
This respects attention budgets and circuit breakers.
Sourcepub async fn trip_circuit_breaker(&self, resonator: ResonatorId)
pub async fn trip_circuit_breaker(&self, resonator: ResonatorId)
Trip circuit breaker for a Resonator
Sourcepub async fn reset_circuit_breaker(&self, resonator: &ResonatorId)
pub async fn reset_circuit_breaker(&self, resonator: &ResonatorId)
Reset circuit breaker for a Resonator
Sourcepub async fn next_task(&self) -> Option<ResonanceTask>
pub async fn next_task(&self) -> Option<ResonanceTask>
Get next task to process (for worker)
Auto Trait Implementations§
impl Freeze for ResonanceScheduler
impl !RefUnwindSafe for ResonanceScheduler
impl Send for ResonanceScheduler
impl Sync for ResonanceScheduler
impl Unpin for ResonanceScheduler
impl !UnwindSafe for ResonanceScheduler
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