pub struct ProducerState { /* private fields */ }Expand description
The state of an active producer for a partition.
Corresponds to org.apache.kafka.clients.admin.ProducerState. producer_id
and last_timestamp are i64 (Java long); coordinator_epoch and
current_transaction_start_offset are optional (Java OptionalInt /
OptionalLong).
Implementations§
Source§impl ProducerState
impl ProducerState
Sourcepub fn new(
producer_id: i64,
producer_epoch: i32,
last_sequence: i32,
last_timestamp: i64,
coordinator_epoch: Option<i32>,
current_transaction_start_offset: Option<i64>,
) -> Self
pub fn new( producer_id: i64, producer_epoch: i32, last_sequence: i32, last_timestamp: i64, coordinator_epoch: Option<i32>, current_transaction_start_offset: Option<i64>, ) -> Self
Creates a new ProducerState.
Sourcepub fn producer_id(&self) -> i64
pub fn producer_id(&self) -> i64
The producer id.
Sourcepub fn producer_epoch(&self) -> i32
pub fn producer_epoch(&self) -> i32
The producer epoch.
Sourcepub fn last_sequence(&self) -> i32
pub fn last_sequence(&self) -> i32
The last sequence number written by this producer.
Sourcepub fn last_timestamp(&self) -> i64
pub fn last_timestamp(&self) -> i64
The last timestamp written by this producer.
Sourcepub fn current_transaction_start_offset(&self) -> Option<i64>
pub fn current_transaction_start_offset(&self) -> Option<i64>
The offset of the first record in the current transaction, if any.
Sourcepub fn coordinator_epoch(&self) -> Option<i32>
pub fn coordinator_epoch(&self) -> Option<i32>
The coordinator epoch, if any.
Trait Implementations§
Source§impl Clone for ProducerState
impl Clone for ProducerState
Source§fn clone(&self) -> ProducerState
fn clone(&self) -> ProducerState
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 ProducerState
impl Debug for ProducerState
Source§impl Display for ProducerState
impl Display for ProducerState
Source§impl Hash for ProducerState
impl Hash for ProducerState
Source§impl PartialEq for ProducerState
impl PartialEq for ProducerState
impl Eq for ProducerState
impl StructuralPartialEq for ProducerState
Auto Trait Implementations§
impl Freeze for ProducerState
impl RefUnwindSafe for ProducerState
impl Send for ProducerState
impl Sync for ProducerState
impl Unpin for ProducerState
impl UnsafeUnpin for ProducerState
impl UnwindSafe for ProducerState
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more