pub enum Operation {
RegisterStandalone {
instance: Instance,
fee_scale: FeeScale,
},
RegisterQuestion {
question: Instance,
fee_scale: FeeScale,
named: Vec<Instance>,
},
RegisterAndAssociate {
question: u32,
named: Instance,
},
SettleOutcome(Settlement),
SettleQuestion {
question: u32,
settlements: Vec<Settlement>,
name: String,
description: String,
},
SetSubDeployers(Vec<Grant>),
}Expand description
What an outcomeDeploy does, under the key naming it.
Variants§
RegisterStandalone
registerStandaloneOutcomeFromTemplate: one outcome with two sides.
RegisterQuestion
registerQuestionFromTemplate: a question and its named outcomes, in
the order given, which is the order they are shown in. The venue adds
a fallback, so N named outcomes make N + 1.
RegisterAndAssociate
registerAndAssociateNamedOutcomeFromTemplate: one more named outcome
on a live question, at the question’s fee scale.
SettleOutcome(Settlement)
settleOutcome. Pays out at once and cannot be undone.
SettleQuestion
settleQuestion2: every named outcome of the question not yet
settled, exactly one of them at 1, the fallback left out. Pays out at
once and cannot be undone.
SetSubDeployers(Vec<Grant>)
setSubDeployers.
Implementations§
Source§impl Operation
impl Operation
Sourcepub const fn permission(&self) -> Option<Permission>
pub const fn permission(&self) -> Option<Permission>
The grant a sub-deployer needs to send this; None for
setSubDeployers, which no grant covers.
Sourcepub const fn is_settlement(&self) -> bool
pub const fn is_settlement(&self) -> bool
Settling pays out at once and cannot be undone.
pub fn body(&self) -> Value
Trait Implementations§
impl Eq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.