Struct nats::jetstream::BatchOptions
source · pub struct BatchOptions {
pub batch: usize,
pub expires: Option<usize>,
pub no_wait: bool,
}
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.
Trait Implementations§
source§impl Clone for BatchOptions
impl Clone for BatchOptions
source§fn clone(&self) -> BatchOptions
fn clone(&self) -> BatchOptions
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 BatchOptions
impl Debug for BatchOptions
source§impl Default for BatchOptions
impl Default for BatchOptions
source§fn default() -> BatchOptions
fn default() -> BatchOptions
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for BatchOptions
impl<'de> Deserialize<'de> for BatchOptions
source§fn 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
source§impl From<usize> for BatchOptions
impl From<usize> for BatchOptions
source§impl PartialEq for BatchOptions
impl PartialEq for BatchOptions
source§fn eq(&self, other: &BatchOptions) -> bool
fn eq(&self, other: &BatchOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BatchOptions
impl Serialize for BatchOptions
impl Copy for BatchOptions
impl Eq for BatchOptions
impl StructuralPartialEq for BatchOptions
Auto Trait Implementations§
impl Freeze for BatchOptions
impl RefUnwindSafe for BatchOptions
impl Send for BatchOptions
impl Sync for BatchOptions
impl Unpin for BatchOptions
impl UnwindSafe for BatchOptions
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