[−][src]Enum cw3::ThresholdResponse
This defines the different ways tallies can happen. It can be extended as needed, but once the spec is frozen, these should not be modified. They are designed to be general.
Variants
Declares a total weight needed to pass This usually implies that count_needed is stable, even if total_weight changes eg. 3 of 5 multisig -> 3 of 6 multisig
Declares a percentage of the total weight needed to pass This implies the percentage is stable, when total_weight changes eg. at 50.1%, we go from needing 51/100 to needing 101/200
Note: percentage_needed = 60% is different than threshold = 60%, quora = 100% as the first will pass with 60% yes votes and 10% no votes, while the second will require the others to vote anything (no, abstain...) to pass
Declares a threshold (minimum percentage of votes that must approve) and a quorum (minimum percentage of voter weight that must vote). This allows eg. 25% of total weight YES to pass, if we have quorum of 40% and threshold of 51% and most of the people sit out the election. This is more common in general elections where participation is expected to be low.
Trait Implementations
impl Clone for ThresholdResponse
[src]
fn clone(&self) -> ThresholdResponse
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ThresholdResponse
[src]
impl<'de> Deserialize<'de> for ThresholdResponse
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl JsonSchema for ThresholdResponse
[src]
fn schema_name() -> String
[src]
fn json_schema(gen: &mut SchemaGenerator) -> Schema
[src]
fn is_referenceable() -> bool
[src]
impl PartialEq<ThresholdResponse> for ThresholdResponse
[src]
fn eq(&self, other: &ThresholdResponse) -> bool
[src]
fn ne(&self, other: &ThresholdResponse) -> bool
[src]
impl Serialize for ThresholdResponse
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for ThresholdResponse
[src]
Auto Trait Implementations
impl RefUnwindSafe for ThresholdResponse
impl Send for ThresholdResponse
impl Sync for ThresholdResponse
impl Unpin for ThresholdResponse
impl UnwindSafe for ThresholdResponse
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,