Struct async_nats::jetstream::consumer::pull::BatchConfig
source · [−]pub struct BatchConfig {
pub batch: usize,
pub expires: Option<usize>,
pub no_wait: bool,
pub max_bytes: usize,
pub idle_heartbeat: Duration,
}
Expand description
Used for next Pull Request for Pull Consumer
Fields
batch: usize
The number of messages that are being requested to be delivered.
expires: Option<usize>
The optional number of nanoseconds that the server will store this next request for before forgetting about the pending batch size.
no_wait: bool
This optionally causes the server not to store this pending request at all, but when there are no messages to deliver will send a nil bytes message with a Status header of 404, this way you can know when you reached the end of the stream for example. A 409 is returned if the Consumer has reached MaxAckPending limits.
max_bytes: usize
Sets max number of bytes in total in given batch size. This works together with batch
.
Whichever value is reached first, batch will complete.
idle_heartbeat: Duration
Setting this other than zero will cause the server to send 100 Idle Hearbeat status to the client
Trait Implementations
sourceimpl Clone for BatchConfig
impl Clone for BatchConfig
sourcefn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BatchConfig
impl Debug for BatchConfig
sourceimpl Default for BatchConfig
impl Default for BatchConfig
sourcefn default() -> BatchConfig
fn default() -> BatchConfig
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for BatchConfig
impl<'de> Deserialize<'de> for BatchConfig
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<BatchConfig> for BatchConfig
impl PartialEq<BatchConfig> for BatchConfig
sourcefn eq(&self, other: &BatchConfig) -> bool
fn eq(&self, other: &BatchConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BatchConfig) -> bool
fn ne(&self, other: &BatchConfig) -> bool
This method tests for !=
.
sourceimpl Serialize for BatchConfig
impl Serialize for BatchConfig
impl Copy for BatchConfig
impl Eq for BatchConfig
impl StructuralEq for BatchConfig
impl StructuralPartialEq for BatchConfig
Auto Trait Implementations
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnwindSafe for BatchConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more