pub trait NativeVault {
// Required methods
fn create<Y, E>(
resource_address: ResourceAddress,
api: &mut Y,
) -> Result<Vault, E>
where Y: SystemApi<E>,
E: SystemApiError;
fn put<Y, E>(&mut self, bucket: Bucket, api: &mut Y) -> Result<(), E>
where Y: SystemApi<E>,
E: SystemApiError;
fn take<Y, E>(&mut self, amount: Decimal, api: &mut Y) -> Result<Bucket, E>
where Y: SystemApi<E>,
E: SystemApiError;
fn take_advanced<Y, E>(
&mut self,
amount: Decimal,
withdraw_strategy: WithdrawStrategy,
api: &mut Y,
) -> Result<Bucket, E>
where Y: SystemApi<E>,
E: SystemApiError;
fn take_all<Y, E>(&mut self, api: &mut Y) -> Result<Bucket, E>
where Y: SystemApi<E>,
E: SystemApiError;
fn amount<Y, E>(&self, api: &mut Y) -> Result<Decimal, E>
where Y: SystemApi<E>,
E: SystemApiError;
fn resource_address<Y, E>(&self, api: &mut Y) -> Result<ResourceAddress, E>
where Y: SystemApi<E>,
E: SystemApiError;
fn burn<Y, E>(&mut self, amount: Decimal, api: &mut Y) -> Result<(), E>
where Y: SystemApi<E>,
E: SystemApiError;
}
Required Methods§
fn create<Y, E>(
resource_address: ResourceAddress,
api: &mut Y,
) -> Result<Vault, E>where
Y: SystemApi<E>,
E: SystemApiError,
fn put<Y, E>(&mut self, bucket: Bucket, api: &mut Y) -> Result<(), E>where
Y: SystemApi<E>,
E: SystemApiError,
fn take<Y, E>(&mut self, amount: Decimal, api: &mut Y) -> Result<Bucket, E>where
Y: SystemApi<E>,
E: SystemApiError,
fn take_advanced<Y, E>(
&mut self,
amount: Decimal,
withdraw_strategy: WithdrawStrategy,
api: &mut Y,
) -> Result<Bucket, E>where
Y: SystemApi<E>,
E: SystemApiError,
fn take_all<Y, E>(&mut self, api: &mut Y) -> Result<Bucket, E>where
Y: SystemApi<E>,
E: SystemApiError,
fn amount<Y, E>(&self, api: &mut Y) -> Result<Decimal, E>where
Y: SystemApi<E>,
E: SystemApiError,
fn resource_address<Y, E>(&self, api: &mut Y) -> Result<ResourceAddress, E>where
Y: SystemApi<E>,
E: SystemApiError,
fn burn<Y, E>(&mut self, amount: Decimal, api: &mut Y) -> Result<(), E>where
Y: SystemApi<E>,
E: SystemApiError,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.