pub struct Transaction { /* private fields */ }Expand description
A live Pulsar transaction token. Holds the broker-assigned magnetar_proto::TxnId.
Transaction is Copy (TxnId is 128 bits of plain data) so it can be passed to
multiple producers / consumers without juggling references.
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn id(&self) -> TxnId
pub fn id(&self) -> TxnId
The transaction id — stamp this on producer sends via
crate::OutgoingMessage::txn and on consumer acks via the runtime
engine’s ack_with_txn family.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Transaction
Source§impl Debug for Transaction
impl Debug for Transaction
Source§impl From<Transaction> for TxnId
impl From<Transaction> for TxnId
Source§fn from(txn: Transaction) -> Self
fn from(txn: Transaction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
impl UnwindSafe for Transaction
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