[][src]Trait rustracts::ContractExt

pub trait ContractExt: Contract {
    type Context;
    fn get_context(&self) -> Self::Context;
}

Extention trait for Contracts.

Associated Types

type Context

Loading content...

Required methods

fn get_context(&self) -> Self::Context

Get a thread-safe handle to a ContractContext.

Loading content...

Implementors

impl<F, C, R> ContractExt for FuturesContract<F, C, R> where
    C: ContractContext + Clone,
    F: FnOnce(C) -> R + Clone
[src]

type Context = Arc<Mutex<C>>

impl<F, C, R> ContractExt for OnKillContract<F, C, R> where
    C: ContractContext + Clone,
    F: FnOnce(C) -> R + Clone
[src]

type Context = Arc<Mutex<C>>

impl<F, VC, PC, R> ContractExt for OptionContract<F, VC, PC, R> where
    VC: ContractContext + Clone,
    PC: ContractContext + Clone,
    F: FnOnce((VC, PC)) -> R + Clone
[src]

type Context = (Arc<Mutex<VC>>, Arc<Mutex<PC>>)

Loading content...