Struct sapio_contrib::contracts::undo_send::UndoSendInternal[][src]

pub struct UndoSendInternal {
    pub from_contract: Compiled,
    pub to_contract: Compiled,
    pub amount: CoinAmount,
    pub timeout: AnyRelTimeLock,
}

UndoSendInternal allows funds to be sent to the to_contract only after a relative timeout. Otherwise, they can move back to the from_contract.

Fields

from_contract: Compiled

The contract to return funds to before timeout

to_contract: Compiled

the contract to forward funds to after timeout

amount: CoinAmount

the amount TODO: remove and use ctx?

timeout: AnyRelTimeLock

the timeout period (relative height or blocks)

Trait Implementations

impl Contract for UndoSendInternal[src]

const THEN_FNS: &'static [fn() -> Option<ThenFunc<'static, Self>>][src]

binds the list of ThenFunc’s to this impl. Any fn() which returns None is ignored (useful for type-level state machines)

type StatefulArguments = ()

Due to type system limitations, all FinishOrFuncs for a Contract type must share a parameter pack type. If stable, no default type allowed. Read more

impl<'de> Deserialize<'de> for UndoSendInternal[src]

impl JsonSchema for UndoSendInternal[src]

impl Serialize for UndoSendInternal[src]

Auto Trait Implementations

Blanket Implementations

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

impl<C> AnyContract for C where
    C: Contract
[src]

type StatefulArguments = <C as Contract>::StatefulArguments

The parameter pack type for FinishOrFuncs.

type Ref = C

A Reference which can be extracted to the contract argument data For some types, Ref == Self, and for other types Ref may point to a member. This enables DynamicContract and Contract to impl AnyContract, as well as more exotic types. Read more

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

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

impl<'a, T> Compilable for T where
    T: AnyContract + 'a,
    <T as AnyContract>::Ref: 'a, 
[src]

pub fn compile(&self, ctx: &Context) -> Result<Object, CompilationError>[src]

The main Compilation Logic for a Contract. TODO: Better Document Semantics

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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.