pub struct RootBucket(pub Principal);
Expand description

A root bucket.

Every token contract has a root bucket. This bucket is used for the main inserting transactions into history, and organizing fetching the bucket that corresponds to a given transaction.

A root bucket implements the same interface as Bucket, but with 3 additional methods.

Use RootBucket’s Into<Bucket> implementation to use a RootBucket as a Bucket.

Tuple Fields

0: Principal

Implementations

Returns a bucket that be used to query for the given transaction ID.

Inserts the given transaction and returns it’s issued transaction ID.

Inserts the given transactions.

The time on the canister.

The time can be used to check if this bucket is on the same subnet as the caller.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Serialize this value into the given Serde serializer. 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.

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

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.