pub struct Scheduler { /* private fields */ }
Expand description
The scheduler to manage with the rate limit of the unhashed api
Make sure that you just spawn one instance of the scheduler. You can receive and schedule as many requests as you like on the instance.
Implementations§
Source§impl Scheduler
impl Scheduler
Sourcepub fn retrieve_sender(&self) -> Sender<ScheduledRequest>
pub fn retrieve_sender(&self) -> Sender<ScheduledRequest>
Retrieve a Sender to allow pushing tasks to the scheduler.
To use multiple senders, you can clone the one you’ve received or retrieve a new one using this method
Sourcepub fn stop_scheduler(self)
pub fn stop_scheduler(self)
Stop the Scheduler.
This will abort the tokio task.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scheduler
impl RefUnwindSafe for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl UnwindSafe for Scheduler
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