pub enum Forfeit {
All,
Proportion {
percent: u32,
},
Fixed {
amount: i32,
},
None,
}Expand description
How much of a datum a death forfeits into a Stake (DSL v0.10, spec-0032).
A creator who wants no death cost at all picks Forfeit::None; the
stake then still marks where they fell, which is the memorial case.
Variants§
All
The whole balance.
Proportion
A percentage of the balance, rounded toward zero (integer arithmetic — ADR-0006 forbids anything a second implementation could round differently).
Fixed
A fixed amount, capped at the balance so a purse can never go negative.
None
Nothing is taken. The stake is a marker, not a wager.
Trait Implementations§
impl Copy for Forfeit
Source§impl<'de> Deserialize<'de> for Forfeit
impl<'de> Deserialize<'de> for Forfeit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Forfeit
Source§impl JsonSchema for Forfeit
impl JsonSchema for Forfeit
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Forfeit
Auto Trait Implementations§
impl Freeze for Forfeit
impl RefUnwindSafe for Forfeit
impl Send for Forfeit
impl Sync for Forfeit
impl Unpin for Forfeit
impl UnsafeUnpin for Forfeit
impl UnwindSafe for Forfeit
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