pub struct QueueQueryBuilder { /* private fields */ }Expand description
Helper to get a list of queues
§Examples
let disque = Disque::open("redis://127.0.0.1:7711/").unwrap();
let queues = QueueQueryBuilder::new().busyloop(true).minlen(50)
.iter(&disque).unwrap().collect::<Vec<_>>();
assert!(queues.len() >= 0);Implementations§
Source§impl QueueQueryBuilder
impl QueueQueryBuilder
Sourcepub fn new() -> QueueQueryBuilder
pub fn new() -> QueueQueryBuilder
Creates a new builder.
Sourcepub fn count(&mut self, count: u64) -> &mut Self
pub fn count(&mut self, count: u64) -> &mut Self
A hint about how much work to do per iteration.
Sourcepub fn busyloop(&mut self, busyloop: bool) -> &mut Self
pub fn busyloop(&mut self, busyloop: bool) -> &mut Self
If true, blocks and returns all the queues in a busy loop.
Sourcepub fn minlen(&mut self, minlen: u64) -> &mut Self
pub fn minlen(&mut self, minlen: u64) -> &mut Self
Only return queues with at least minlen jobs.
Sourcepub fn maxlen(&mut self, maxlen: u64) -> &mut Self
pub fn maxlen(&mut self, maxlen: u64) -> &mut Self
Only return queues with at most maxlen jobs.
Sourcepub fn importrate(&mut self, importrate: u64) -> &mut Self
pub fn importrate(&mut self, importrate: u64) -> &mut Self
Only return queues with a job import rate (from other nodes) greater
than or equal to importrate.
Auto Trait Implementations§
impl Freeze for QueueQueryBuilder
impl RefUnwindSafe for QueueQueryBuilder
impl Send for QueueQueryBuilder
impl Sync for QueueQueryBuilder
impl Unpin for QueueQueryBuilder
impl UnwindSafe for QueueQueryBuilder
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