pub struct ResponseScheduler { /* private fields */ }
Expand description
Schedule manager for time-based response scheduling
Implementations§
Source§impl ResponseScheduler
impl ResponseScheduler
Sourcepub fn new(clock: Arc<VirtualClock>) -> Self
pub fn new(clock: Arc<VirtualClock>) -> Self
Create a new response scheduler
Sourcepub fn schedule(&self, response: ScheduledResponse) -> Result<String, String>
pub fn schedule(&self, response: ScheduledResponse) -> Result<String, String>
Schedule a response to be returned at a specific time
Sourcepub fn get_due_responses(&self) -> Vec<ScheduledResponse>
pub fn get_due_responses(&self) -> Vec<ScheduledResponse>
Get responses that should be triggered at the current time
Sourcepub fn list_scheduled(&self) -> Vec<ScheduledResponse>
pub fn list_scheduled(&self) -> Vec<ScheduledResponse>
Get all scheduled responses
Trait Implementations§
Source§impl Clone for ResponseScheduler
impl Clone for ResponseScheduler
Source§fn clone(&self) -> ResponseScheduler
fn clone(&self) -> ResponseScheduler
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 ResponseScheduler
impl RefUnwindSafe for ResponseScheduler
impl Send for ResponseScheduler
impl Sync for ResponseScheduler
impl Unpin for ResponseScheduler
impl UnwindSafe for ResponseScheduler
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