pub struct TransactionDescription { /* private fields */ }Expand description
The description of a transaction.
Corresponds to org.apache.kafka.clients.admin.TransactionDescription.
producer_id and transaction_timeout_ms are i64 (Java long);
coordinator_id and producer_epoch are i32 (Java int);
transaction_start_time_ms is optional (Java OptionalLong).
Implementations§
Source§impl TransactionDescription
impl TransactionDescription
Sourcepub fn new(
coordinator_id: i32,
state: TransactionState,
producer_id: i64,
producer_epoch: i32,
transaction_timeout_ms: i64,
transaction_start_time_ms: Option<i64>,
topic_partitions: HashSet<TopicPartition>,
) -> Self
pub fn new( coordinator_id: i32, state: TransactionState, producer_id: i64, producer_epoch: i32, transaction_timeout_ms: i64, transaction_start_time_ms: Option<i64>, topic_partitions: HashSet<TopicPartition>, ) -> Self
Creates a new TransactionDescription.
Sourcepub fn coordinator_id(&self) -> i32
pub fn coordinator_id(&self) -> i32
The id of the coordinator that owns this transaction.
Sourcepub fn state(&self) -> TransactionState
pub fn state(&self) -> TransactionState
The current state of the transaction.
Sourcepub fn producer_id(&self) -> i64
pub fn producer_id(&self) -> i64
The producer id of the transaction.
Sourcepub fn producer_epoch(&self) -> i32
pub fn producer_epoch(&self) -> i32
The producer epoch of the transaction.
Sourcepub fn transaction_timeout_ms(&self) -> i64
pub fn transaction_timeout_ms(&self) -> i64
The transaction timeout in milliseconds.
Sourcepub fn transaction_start_time_ms(&self) -> Option<i64>
pub fn transaction_start_time_ms(&self) -> Option<i64>
The transaction start time in milliseconds, if a transaction is in progress.
Sourcepub fn topic_partitions(&self) -> &HashSet<TopicPartition>
pub fn topic_partitions(&self) -> &HashSet<TopicPartition>
The set of topic partitions that have been added to the transaction.
Trait Implementations§
Source§impl Clone for TransactionDescription
impl Clone for TransactionDescription
Source§fn clone(&self) -> TransactionDescription
fn clone(&self) -> TransactionDescription
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 TransactionDescription
impl Debug for TransactionDescription
Source§impl Display for TransactionDescription
impl Display for TransactionDescription
Source§impl PartialEq for TransactionDescription
impl PartialEq for TransactionDescription
impl Eq for TransactionDescription
impl StructuralPartialEq for TransactionDescription
Auto Trait Implementations§
impl Freeze for TransactionDescription
impl RefUnwindSafe for TransactionDescription
impl Send for TransactionDescription
impl Sync for TransactionDescription
impl Unpin for TransactionDescription
impl UnsafeUnpin for TransactionDescription
impl UnwindSafe for TransactionDescription
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