pub struct Bucket(/* private fields */);
Expand description
A contract-specific bucket canister.
A bucket canister implements storage for its parent contract. The total storage for a given contract is created using multiple bucket canisters, which are interconnected using a root bucket and router system. Querying buckets also features pagination.
Implementations§
Source§impl Bucket
impl Bucket
Sourcepub async fn get_next_canisters(
&self,
) -> Result<Vec<Bucket>, (RejectionCode, String)>
pub async fn get_next_canisters( &self, ) -> Result<Vec<Bucket>, (RejectionCode, String)>
Returns the list of canisters which have different pages of data.
Sourcepub async fn get_transaction(
&self,
id: u64,
) -> Result<GetTransactionResponse, (RejectionCode, String)>
pub async fn get_transaction( &self, id: u64, ) -> Result<GetTransactionResponse, (RejectionCode, String)>
Returns the transaction corresponding to the passed transaction ID.
Sourcepub async fn get_transactions(
&self,
page: Option<u32>,
) -> Result<GetTransactionsResponse, (RejectionCode, String)>
pub async fn get_transactions( &self, page: Option<u32>, ) -> Result<GetTransactionsResponse, (RejectionCode, String)>
Returns all of the transactions for this contract.
Sourcepub async fn get_user_transactions(
&self,
user: Principal,
page: Option<u32>,
) -> Result<GetTransactionsResponse, (RejectionCode, String)>
pub async fn get_user_transactions( &self, user: Principal, page: Option<u32>, ) -> Result<GetTransactionsResponse, (RejectionCode, String)>
Returns all of the transactions associated with the given user.
Trait Implementations§
Source§impl From<RootBucket> for Bucket
impl From<RootBucket> for Bucket
Source§fn from(root: RootBucket) -> Self
fn from(root: RootBucket) -> Self
Converts to this type from the input type.
impl Copy for Bucket
Auto Trait Implementations§
impl Freeze for Bucket
impl RefUnwindSafe for Bucket
impl Send for Bucket
impl Sync for Bucket
impl Unpin for Bucket
impl UnwindSafe for Bucket
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