[][src]Trait rustracts::Contract

pub trait Contract: Future {
    fn execute(self: Pin<&mut Self>) -> Self::Output;
fn void(self: Pin<&mut Self>) -> Self::Output; fn poll_valid(&self) -> bool { ... } }

Contract Trait

Required methods

fn execute(self: Pin<&mut Self>) -> Self::Output

Produce a status of the contract on expiration.

fn void(self: Pin<&mut Self>) -> Self::Output

Produce a status of the contract on cancel.

Loading content...

Provided methods

fn poll_valid(&self) -> bool

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

Loading content...

Implementors

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

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

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

Loading content...