Struct abstract_cw3::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,
pub proposer: Addr,
pub deposit: Option<DepositInfo>,
}Fields§
§title: String§description: String§start_height: u64§expires: Expiration§msgs: Vec<CosmosMsg<Empty>>§status: Status§threshold: Thresholdpass requirements
total_weight: u64§votes: Votes§proposer: AddrThe address that created the proposal.
deposit: Option<DepositInfo>The deposit that was paid along with this proposal. This may be refunded upon proposal completion.
Implementations§
source§impl 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§
source§impl<'de> Deserialize<'de> for Proposal
impl<'de> Deserialize<'de> for Proposal
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
source§impl JsonSchema for Proposal
impl JsonSchema for Proposal
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn 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 moresource§impl PartialEq for Proposal
impl PartialEq for Proposal
impl StructuralPartialEq for Proposal
Auto Trait Implementations§
impl Freeze for Proposal
impl RefUnwindSafe for Proposal
impl Send for Proposal
impl Sync for Proposal
impl Unpin for Proposal
impl UnwindSafe for Proposal
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