pub struct QueueReceiveConfig {
pub poll_interval: Duration,
pub max_wait: Option<Duration>,
pub max_chunk_size: Option<usize>,
pub min_chunk_size: usize,
pub cooldown: Option<Duration>,
pub batch_strategy: BatchStrategy,
}
Fields§
§poll_interval: Duration
How long to wait between polling attempts when the queue is empty
max_wait: Option<Duration>
The longest period to wait before returning an empty vec. None means wait forever
max_chunk_size: Option<usize>
The largest number of items to return per method call. None means no limit.
min_chunk_size: usize
§cooldown: Option<Duration>
If an identical item is read from the queue multiple times within this many seconds, only the first one is used. None disables deduplication.
batch_strategy: BatchStrategy
How to behave when the number of items in the queue is between 0 and max_chunk_size.
Trait Implementations§
Source§impl Clone for QueueReceiveConfig
impl Clone for QueueReceiveConfig
Source§fn clone(&self) -> QueueReceiveConfig
fn clone(&self) -> QueueReceiveConfig
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 moreSource§impl Debug for QueueReceiveConfig
impl Debug for QueueReceiveConfig
Source§impl Default for QueueReceiveConfig
impl Default for QueueReceiveConfig
Source§impl From<QueueReceiveConfig> for Vec<Override>
impl From<QueueReceiveConfig> for Vec<Override>
Source§fn from(value: QueueReceiveConfig) -> Self
fn from(value: QueueReceiveConfig) -> Self
Converts to this type from the input type.
impl Copy for QueueReceiveConfig
Auto Trait Implementations§
impl Freeze for QueueReceiveConfig
impl RefUnwindSafe for QueueReceiveConfig
impl Send for QueueReceiveConfig
impl Sync for QueueReceiveConfig
impl Unpin for QueueReceiveConfig
impl UnwindSafe for QueueReceiveConfig
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