pub struct UnderFundedExplodingOption<T: 'static> { /* private fields */ }
Expand description
Similar to ExplodingOption
except that the option requires an additional
value amount to be paid in in order to execute, hence being “under funded”
Trait Implementations§
Source§impl<T> Contract for UnderFundedExplodingOption<T>
impl<T> Contract for UnderFundedExplodingOption<T>
Source§const THEN_FNS: &'static [fn() -> Option<ThenFuncAsFinishOrFunc<'static, Self, Self::StatefulArguments>>]
const THEN_FNS: &'static [fn() -> Option<ThenFuncAsFinishOrFunc<'static, Self, Self::StatefulArguments>>]
binds the list of ThenFunc
’s to this impl.
Any fn() which returns None is ignored (useful for type-level state machines)
Source§type StatefulArguments = ()
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.Source§const FINISH_OR_FUNCS: &'static [fn() -> Option<Box<dyn CallableAsFoF<Self, Self::StatefulArguments>>>] = _
const FINISH_OR_FUNCS: &'static [fn() -> Option<Box<dyn CallableAsFoF<Self, Self::StatefulArguments>>>] = _
binds the list of
FinishOrFunc
’s to this impl.
Any fn() which returns None is ignored (useful for type-level state machines)Source§const FINISH_FNS: &'static [fn() -> Option<Guard<Self>>] = _
const FINISH_FNS: &'static [fn() -> Option<Guard<Self>>] = _
binds the list of
Gurard
’s to this impl as unlocking conditions.
Guard
s only need to be bound if it is desired that they are
sufficient to unlock funds, a Guard
should not be bound if it is
intended to be used with a ThenFunc
.
Any fn() which returns None is ignored (useful for type-level state machines)Source§fn metadata(&self, _ctx: Context) -> Result<ObjectMetadata, CompilationError>
fn metadata(&self, _ctx: Context) -> Result<ObjectMetadata, CompilationError>
Generate metadata for this contract object
Source§fn ensure_amount(&self, _ctx: Context) -> Result<Amount, CompilationError>
fn ensure_amount(&self, _ctx: Context) -> Result<Amount, CompilationError>
minimum balance to have in this coin
Source§impl<T> Explodes for UnderFundedExplodingOption<T>
impl<T> Explodes for UnderFundedExplodingOption<T>
Source§fn explodes<'a>() -> Option<ThenFuncAsFinishOrFunc<'a, Self, <Self as Contract>::StatefulArguments>>
fn explodes<'a>() -> Option<ThenFuncAsFinishOrFunc<'a, Self, <Self as Contract>::StatefulArguments>>
(missing docs fix)
Source§fn then_explodes(&self, ctx: Context, _: ThenFuncTypeTag) -> TxTmplIt
fn then_explodes(&self, ctx: Context, _: ThenFuncTypeTag) -> TxTmplIt
(missing docs fix)
Source§fn strikes<'a>() -> Option<ThenFuncAsFinishOrFunc<'a, Self, <Self as Contract>::StatefulArguments>>
fn strikes<'a>() -> Option<ThenFuncAsFinishOrFunc<'a, Self, <Self as Contract>::StatefulArguments>>
(missing docs fix)
Source§fn then_strikes(&self, ctx: Context, _: ThenFuncTypeTag) -> TxTmplIt
fn then_strikes(&self, ctx: Context, _: ThenFuncTypeTag) -> TxTmplIt
(missing docs fix)
Auto Trait Implementations§
impl<T> Freeze for UnderFundedExplodingOption<T>where
T: Freeze,
impl<T> RefUnwindSafe for UnderFundedExplodingOption<T>where
T: RefUnwindSafe,
impl<T> Send for UnderFundedExplodingOption<T>where
T: Send,
impl<T> Sync for UnderFundedExplodingOption<T>where
T: Sync,
impl<T> Unpin for UnderFundedExplodingOption<T>where
T: Unpin,
impl<T> UnwindSafe for UnderFundedExplodingOption<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more