Struct cw3_fixed_multisig_secdao_6fe6ca1::state::Proposal
source · [−]pub struct Proposal {
pub title: String,
pub description: String,
pub start_height: u64,
pub expires: Expiration,
pub msgs: Vec<CosmosMsg<Empty>>,
pub status: Status,
pub threshold: Threshold,
pub total_weight: u64,
pub votes: Votes,
}
Fields
title: String
description: String
start_height: u64
expires: Expiration
msgs: Vec<CosmosMsg<Empty>>
status: Status
threshold: Threshold
pass requirements
total_weight: u64
votes: Votes
Implementations
sourceimpl Proposal
impl Proposal
sourcepub fn current_status(&self, block: &BlockInfo) -> Status
pub fn current_status(&self, block: &BlockInfo) -> Status
current_status is non-mutable and returns what the status should be. (designed for queries)
sourcepub fn update_status(&mut self, block: &BlockInfo)
pub fn update_status(&mut self, block: &BlockInfo)
update_status sets the status of the proposal to current_status. (designed for handler logic)
sourcepub fn is_passed(&self, block: &BlockInfo) -> bool
pub fn is_passed(&self, block: &BlockInfo) -> bool
Returns true if this proposal is sure to pass (even before expiration, if no future sequence of possible votes could cause it to fail).
sourcepub fn is_rejected(&self, block: &BlockInfo) -> bool
pub fn is_rejected(&self, block: &BlockInfo) -> bool
Returns true if this proposal is sure to be rejected (even before expiration, if no future sequence of possible votes could cause it to pass).
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Proposal
impl<'de> Deserialize<'de> for Proposal
sourcefn 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
sourceimpl JsonSchema for Proposal
impl JsonSchema for Proposal
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the $ref
keyword. Read more
impl StructuralPartialEq for Proposal
Auto Trait Implementations
impl RefUnwindSafe for Proposal
impl Send for Proposal
impl Sync for Proposal
impl Unpin for Proposal
impl UnwindSafe for Proposal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more