[][src]Trait rustracts::Contract

pub trait Contract: Future {
    fn execute(&self) -> Self::Output;
fn void(&self) -> Self::Output; fn is_valid(&self) -> bool { ... }
fn is_expired(&self) -> bool { ... } }

Contract Trait

Required methods

fn execute(&self) -> Self::Output

Produce a status of the contract on expiration.

fn void(&self) -> Self::Output

Produce a status of the contract on cancel.

Loading content...

Provided methods

fn is_valid(&self) -> bool

Check wether the contract is still valid. Always true by default.

fn is_expired(&self) -> bool

Check wether the contract has expired. Always false by default.

Loading content...

Implementors

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

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

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

Loading content...