Struct tinychain::txn::Txn[][src]

pub struct Txn { /* fields omitted */ }
Expand description

A transaction context.

Implementations

Return the current number of strong references to this Txn.

Claim ownership of this transaction.

Return a new Txn which grants the given Scopes to the given Actor.

Check if this transaction has a leader for the given cluster.

Check if this transaction has an owner.

Check if this host is leading the transaction for the specified cluster.

Check if the cluster at the specified path on this host is the owner of the transaction.

Claim leadership of this transaction for the given cluster.

Return the leader of this transaction for the given cluster, if there is one.

Return the owner of this transaction, if there is one.

Return a link to the given path on this host.

Return the Request which initiated this transaction on this host.

Resolve a GET op within this transaction context.

Resolve a PUT op within this transaction context.

Resolve a POST op within this transaction context.

Resolve a DELETE op within this transaction context.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The TxnId of this transaction context.

Borrow the fs::Dir of this transaction context.

Consume this Txn and return its fs::Dir.

Return a transaction subcontext with its own fs::Dir.

Return a transaction subcontext with its own unique fs::Dir.

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

Cast an instance of T into an instance of Self.

Cast an instance of Self into an instance of T.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Returns true if self can be cast into the target type T.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Test if value can be cast into Self.

Returns Some(Self) if the source value can be cast into Self, otherwise None.

Returns Ok(Self) if the source value can be cast into Self, otherwise calls on_err.

Test if self can be cast into T.

Returns Some(T) if self can be cast into T, otherwise None.

Returns Ok(T) if self can be cast into T, otherwise calls on_err.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more