Struct ink_env::call::CallBuilder[][src]

pub struct CallBuilder<E, Callee, GasLimit, TransferredValue, Args, RetType> where
    E: Environment
{ /* fields omitted */ }

Builds up a cross contract call.

Implementations

impl<E, GasLimit, TransferredValue, Args, RetType> CallBuilder<E, Unset<E::AccountId>, GasLimit, TransferredValue, Args, RetType> where
    E: Environment
[src]

pub fn callee(
    self,
    callee: E::AccountId
) -> CallBuilder<E, Set<E::AccountId>, GasLimit, TransferredValue, Args, RetType>
[src]

Sets the called smart contract instance account ID to the given value.

impl<E, Callee, TransferredValue, Args, RetType> CallBuilder<E, Callee, Unset<u64>, TransferredValue, Args, RetType> where
    E: Environment
[src]

pub fn gas_limit(
    self,
    gas_limit: u64
) -> CallBuilder<E, Callee, Set<u64>, TransferredValue, Args, RetType>
[src]

Sets the maximum allowed gas costs for the call.

impl<E, Callee, GasLimit, Args, RetType> CallBuilder<E, Callee, GasLimit, Unset<E::Balance>, Args, RetType> where
    E: Environment
[src]

pub fn transferred_value(
    self,
    transferred_value: E::Balance
) -> CallBuilder<E, Callee, GasLimit, Set<E::Balance>, Args, RetType>
[src]

Sets the value transferred upon the execution of the call.

impl<E, Callee, GasLimit, TransferredValue, Args> CallBuilder<E, Callee, GasLimit, TransferredValue, Args, Unset<ReturnType<()>>> where
    E: Environment
[src]

pub fn returns<R>(
    self
) -> CallBuilder<E, Callee, GasLimit, TransferredValue, Args, Set<R>> where
    R: IndicateReturnType
[src]

Sets the type of the returned value upon the execution of the call.

Note

Either use .returns::<()> to signal that the call does not return a value or use .returns::<ReturnType<T>> to signal that the call returns a value of type T.

impl<E, Callee, GasLimit, TransferredValue, RetType> CallBuilder<E, Callee, GasLimit, TransferredValue, Unset<ExecutionInput<EmptyArgumentList>>, RetType> where
    E: Environment
[src]

pub fn exec_input<Args>(
    self,
    exec_input: ExecutionInput<Args>
) -> CallBuilder<E, Callee, GasLimit, TransferredValue, Set<ExecutionInput<Args>>, RetType>
[src]

Sets the execution input to the given value.

impl<E, GasLimit, TransferredValue, Args, RetType> CallBuilder<E, Set<E::AccountId>, GasLimit, TransferredValue, Set<ExecutionInput<Args>>, Set<RetType>> where
    E: Environment,
    GasLimit: Unwrap<Output = u64>,
    TransferredValue: Unwrap<Output = E::Balance>, 
[src]

pub fn params(self) -> CallParams<E, Args, RetType>[src]

Finalizes the call builder to call a function.

impl<E, GasLimit, TransferredValue, Args> CallBuilder<E, Set<E::AccountId>, GasLimit, TransferredValue, Set<ExecutionInput<Args>>, Set<()>> where
    E: Environment,
    GasLimit: Unwrap<Output = u64>,
    Args: Encode,
    TransferredValue: Unwrap<Output = E::Balance>, 
[src]

pub fn fire(self) -> Result<(), Error>[src]

Invokes the cross-chain function call.

impl<E, GasLimit, TransferredValue, Args, R> CallBuilder<E, Set<E::AccountId>, GasLimit, TransferredValue, Set<ExecutionInput<Args>>, Set<ReturnType<R>>> where
    E: Environment,
    GasLimit: Unwrap<Output = u64>,
    Args: Encode,
    R: Decode,
    TransferredValue: Unwrap<Output = E::Balance>, 
[src]

pub fn fire(self) -> Result<R, Error>[src]

Invokes the cross-chain function call and returns the result.

Auto Trait Implementations

impl<E, Callee, GasLimit, TransferredValue, Args, RetType> RefUnwindSafe for CallBuilder<E, Callee, GasLimit, TransferredValue, Args, RetType> where
    Args: RefUnwindSafe,
    Callee: RefUnwindSafe,
    GasLimit: RefUnwindSafe,
    RetType: RefUnwindSafe,
    TransferredValue: RefUnwindSafe

impl<E, Callee, GasLimit, TransferredValue, Args, RetType> Send for CallBuilder<E, Callee, GasLimit, TransferredValue, Args, RetType> where
    Args: Send,
    Callee: Send,
    GasLimit: Send,
    RetType: Send,
    TransferredValue: Send

impl<E, Callee, GasLimit, TransferredValue, Args, RetType> Sync for CallBuilder<E, Callee, GasLimit, TransferredValue, Args, RetType> where
    Args: Sync,
    Callee: Sync,
    GasLimit: Sync,
    RetType: Sync,
    TransferredValue: Sync

impl<E, Callee, GasLimit, TransferredValue, Args, RetType> Unpin for CallBuilder<E, Callee, GasLimit, TransferredValue, Args, RetType> where
    Args: Unpin,
    Callee: Unpin,
    GasLimit: Unpin,
    RetType: Unpin,
    TransferredValue: Unpin

impl<E, Callee, GasLimit, TransferredValue, Args, RetType> UnwindSafe for CallBuilder<E, Callee, GasLimit, TransferredValue, Args, RetType> where
    Args: UnwindSafe,
    Callee: UnwindSafe,
    GasLimit: UnwindSafe,
    RetType: UnwindSafe,
    TransferredValue: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,