pub struct CreateBatchOptions {
pub max_size_in_bytes: Option<u64>,
pub partition_key: Option<String>,
}Expand description
A set of options that can be specified when creating a batch of events.
Fields§
§max_size_in_bytes: Option<u64>The maximum size of the batch in bytes. If not specified, the maximum size will be determined by the Event Hub.
partition_key: Option<String>The partition key to associate with the batch of events. See `crate::producer::Partition::Key for more details.
Implementations§
Source§impl CreateBatchOptions
impl CreateBatchOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new instance of CreateBatchOptions with default values
§Default Value
max_size_in_bytes:Nonepartition_key:None
Sourcepub fn with_max_size_in_bytes(self, max_size_in_bytes: u64) -> Self
pub fn with_max_size_in_bytes(self, max_size_in_bytes: u64) -> Self
Set the max_size_in_bytes field
Sourcepub fn with_partition_key(self, partition_key: impl Into<String>) -> Self
pub fn with_partition_key(self, partition_key: impl Into<String>) -> Self
Set the partition_key field
Trait Implementations§
Source§impl Clone for CreateBatchOptions
impl Clone for CreateBatchOptions
Source§fn clone(&self) -> CreateBatchOptions
fn clone(&self) -> CreateBatchOptions
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 CreateBatchOptions
impl Debug for CreateBatchOptions
Source§impl Default for CreateBatchOptions
impl Default for CreateBatchOptions
Source§fn default() -> CreateBatchOptions
fn default() -> CreateBatchOptions
Returns the “default value” for a type. Read more
Source§impl Hash for CreateBatchOptions
impl Hash for CreateBatchOptions
Source§impl Ord for CreateBatchOptions
impl Ord for CreateBatchOptions
Source§fn cmp(&self, other: &CreateBatchOptions) -> Ordering
fn cmp(&self, other: &CreateBatchOptions) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CreateBatchOptions
impl PartialEq for CreateBatchOptions
Source§impl PartialOrd for CreateBatchOptions
impl PartialOrd for CreateBatchOptions
impl Eq for CreateBatchOptions
impl StructuralPartialEq for CreateBatchOptions
Auto Trait Implementations§
impl Freeze for CreateBatchOptions
impl RefUnwindSafe for CreateBatchOptions
impl Send for CreateBatchOptions
impl Sync for CreateBatchOptions
impl Unpin for CreateBatchOptions
impl UnwindSafe for CreateBatchOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.