pub struct Configuration {
pub shutdown: Box<dyn Shutdown>,
pub timeout: Option<Duration>,
}Expand description
Configuration for produce method.
Fields§
§shutdown: Box<dyn Shutdown>When this future resolves producers stops producing and returns.
NOTE: By default it is set with futures::future::Pending, but it doesn’t
mean producer will never stop - it will still stop when transport is closed,
or it can be stopped by provided send_error_callback or receive_error_callback.
This future is intended for triggering shutdown manually.
timeout: Option<Duration>Optional duration after which producer will shutdown if it will not receive any messages during that period (and there are no requests pending).
NOTE: It resets on every message received - so a producer that has received messages
in the past can still time out when a period of duration length with no further messages
occurs.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Configuration
impl !Sync for Configuration
impl !UnwindSafe for Configuration
impl Freeze for Configuration
impl Send for Configuration
impl Unpin for Configuration
impl UnsafeUnpin for Configuration
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