pub struct SnerdQueue {
pub name: String,
pub file_store: FileStore,
pub rate_limiter: RateLimiter,
pub progress_tx: Sender<ProgressMessage>,
/* private fields */
}Fields§
§name: String§file_store: FileStore§rate_limiter: RateLimiter§progress_tx: Sender<ProgressMessage>Implementations§
Source§impl SnerdQueue
impl SnerdQueue
pub fn new(name: &str, file_store: FileStore, rate_limiter: RateLimiter) -> Self
pub fn subscribe_progress(&self) -> Receiver<ProgressMessage>
pub fn yield_progress(&self, task_id: &str, data: &str)
pub async fn register_task_handler<F>(&self, task_type: &str, handler: F)
pub async fn register_max_retry_handler<F>(&self, task_type: &str, handler: F)
pub fn enqueue(&self, task: RetryableTask) -> Result<()>
pub async fn start_processor(&self, interval: Duration)
pub async fn process_due_tasks(&self)
Trait Implementations§
Source§impl Clone for SnerdQueue
impl Clone for SnerdQueue
Source§fn clone(&self) -> SnerdQueue
fn clone(&self) -> SnerdQueue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for SnerdQueue
impl !UnwindSafe for SnerdQueue
impl Freeze for SnerdQueue
impl Send for SnerdQueue
impl Sync for SnerdQueue
impl Unpin for SnerdQueue
impl UnsafeUnpin for SnerdQueue
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