pub struct PurgeConfig { /* private fields */ }
Expand description
Settings to provide to Producer::purge
to parametrize the purge behavior
PurgeConfig::default()
corresponds to a setting where nothing is purged.
§Example
To purge both queued messages and in-flight messages:
let settings = PurgeConfig::default().queue().inflight();
Implementations§
Source§impl PurgeConfig
impl PurgeConfig
Sourcepub fn queue(self) -> Self
pub fn queue(self) -> Self
Purge messages in internal queues. This does not purge inflight messages.
Sourcepub fn inflight(self) -> Self
pub fn inflight(self) -> Self
Purge messages in-flight to or from the broker. Purging these messages will void any future acknowledgements from the broker, making it impossible for the application to know if these messages were successfully delivered or not. Retrying these messages may lead to duplicates.
This does not purge messages in internal queues.
Sourcepub fn non_blocking(self) -> Self
pub fn non_blocking(self) -> Self
Don’t wait for background thread queue purging to finish.
Source§impl PurgeConfig
impl PurgeConfig
Sourcepub fn no_inflight(self) -> Self
pub fn no_inflight(self) -> Self
Unsets the flag set by inflight
Sourcepub fn blocking(self) -> Self
pub fn blocking(self) -> Self
Unsets the flag set by non_blocking
Trait Implementations§
Source§impl Clone for PurgeConfig
impl Clone for PurgeConfig
Source§fn clone(&self) -> PurgeConfig
fn clone(&self) -> PurgeConfig
Returns a copy 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 PurgeConfig
impl Debug for PurgeConfig
Source§impl Default for PurgeConfig
impl Default for PurgeConfig
Source§fn default() -> PurgeConfig
fn default() -> PurgeConfig
Returns the “default value” for a type. Read more
impl Copy for PurgeConfig
Auto Trait Implementations§
impl Freeze for PurgeConfig
impl RefUnwindSafe for PurgeConfig
impl Send for PurgeConfig
impl Sync for PurgeConfig
impl Unpin for PurgeConfig
impl UnwindSafe for PurgeConfig
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