Trait scrypto::resource::bucket::ScryptoBucket
source · pub trait ScryptoBucket {
type ProofType;
Show 14 methods
// Required methods
fn new(resource_address: ResourceAddress) -> Self;
fn drop_empty(self);
fn burn(self);
fn create_proof_of_all(&self) -> Self::ProofType;
fn resource_address(&self) -> ResourceAddress;
fn put(&mut self, other: Self);
fn amount(&self) -> Decimal;
fn take<A: Into<Decimal>>(&mut self, amount: A) -> Self;
fn take_advanced<A: Into<Decimal>>(
&mut self,
amount: A,
withdraw_strategy: WithdrawStrategy
) -> Self;
fn is_empty(&self) -> bool;
fn as_fungible(&self) -> FungibleBucket;
fn as_non_fungible(&self) -> NonFungibleBucket;
fn authorize_with_all<F: FnOnce() -> O, O>(&self, f: F) -> O;
// Provided method
fn resource_manager(&self) -> ResourceManager { ... }
}
Required Associated Types§
Required Methods§
fn new(resource_address: ResourceAddress) -> Self
fn drop_empty(self)
fn burn(self)
fn create_proof_of_all(&self) -> Self::ProofType
fn resource_address(&self) -> ResourceAddress
fn put(&mut self, other: Self)
fn amount(&self) -> Decimal
fn take<A: Into<Decimal>>(&mut self, amount: A) -> Self
fn take_advanced<A: Into<Decimal>>( &mut self, amount: A, withdraw_strategy: WithdrawStrategy ) -> Self
fn is_empty(&self) -> bool
fn as_fungible(&self) -> FungibleBucket
fn as_non_fungible(&self) -> NonFungibleBucket
Provided Methods§
fn resource_manager(&self) -> ResourceManager
Object Safety§
This trait is not object safe.