Struct dist_tx::tm::XaTransactionId

source ·
pub struct XaTransactionId { /* private fields */ }
Expand description

The ID of a distributed transaction, in analogy to the X/Open XA standard.

Implementations

Creates an instance of XaTransactionId from the three components format_id, global_tid, and branch_qualifier.

Note that the lengths of the binary parameters must not exceed 64.

XA uses a signed int for the format_id, but recommends using only -1, 0, and positive values, where -1 is used to represent the NULL value.

Creates an instance of XaTransactionId that represents NULL.

Returns the format_id.

Returns a reference to the global transaction id.

Returns a reference to the branch qualifier.

Provides a binary representation. If padding is true, and the combined length of the binary fields is below 128 bytes, the missing number of zero bytes are appended to make the byte pattern compatible with the XA structure in C.

Reads a Vec of instances from a binary representation. If padding is true, and the combined length of the binary fields is below 128 bytes, the missing number of bytes are skipped to make the byte pattern compatible with the XA structure in C.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.