Trait concordium_std::HasActions [−][src]
pub trait HasActions { fn accept() -> Self; fn simple_transfer(acc: &AccountAddress, amount: Amount) -> Self; fn send_raw(
ca: &ContractAddress,
receive_name: ReceiveName<'_>,
amount: Amount,
parameter: &[u8]
) -> Self; fn and_then(self, then: Self) -> Self; fn or_else(self, el: Self) -> Self; }
Expand description
An object that can serve to construct actions.
The actions that a smart contract can produce as a result of its execution. These actions form a tree and are executed by the scheduler in the predefined order.
Required methods
fn accept() -> Self
[src]
Expand description
Default accept action.
fn simple_transfer(acc: &AccountAddress, amount: Amount) -> Self
[src]
Expand description
Send a given amount to an account.
fn send_raw(
ca: &ContractAddress,
receive_name: ReceiveName<'_>,
amount: Amount,
parameter: &[u8]
) -> Self
[src]
ca: &ContractAddress,
receive_name: ReceiveName<'_>,
amount: Amount,
parameter: &[u8]
) -> Self
Expand description
Send a message to a contract.
fn and_then(self, then: Self) -> Self
[src]
Expand description
If the execution of the first action succeeds, run the second action as well.
fn or_else(self, el: Self) -> Self
[src]
Expand description
If the execution of the first action fails, try the second.
Implementors
impl HasActions for ActionsTree
[src]
impl HasActions for ActionsTree
[src]fn accept() -> Self
[src]
fn simple_transfer(acc: &AccountAddress, amount: Amount) -> Self
[src]
fn send_raw(
ca: &ContractAddress,
receive_name: ReceiveName<'_>,
amount: Amount,
parameter: &[u8]
) -> Self
[src]
ca: &ContractAddress,
receive_name: ReceiveName<'_>,
amount: Amount,
parameter: &[u8]
) -> Self
fn and_then(self, then: Self) -> Self
[src]
fn or_else(self, el: Self) -> Self
[src]
impl HasActions for Action
[src]
impl HasActions for Action
[src]#Implementation of actions. These actions are implemented by direct calls to host functions.
fn accept() -> Self
[src]
fn simple_transfer(acc: &AccountAddress, amount: Amount) -> Self
[src]
fn send_raw(
ca: &ContractAddress,
receive_name: ReceiveName<'_>,
amount: Amount,
parameter: &[u8]
) -> Self
[src]
ca: &ContractAddress,
receive_name: ReceiveName<'_>,
amount: Amount,
parameter: &[u8]
) -> Self