pub struct Proposal {Show 13 fields
pub id: u64,
pub messages: Vec<Any>,
pub status: i32,
pub final_tally_result: Option<TallyResult>,
pub submit_time: Option<Timestamp>,
pub deposit_end_time: Option<Timestamp>,
pub total_deposit: Vec<Coin>,
pub voting_start_time: Option<Timestamp>,
pub voting_end_time: Option<Timestamp>,
pub metadata: String,
pub title: String,
pub summary: String,
pub proposer: String,
}
Expand description
Proposal defines the core field members of a governance proposal.
Fields§
§id: u64
id defines the unique id of the proposal.
messages: Vec<Any>
messages are the arbitrary messages to be executed if the proposal passes.
status: i32
status defines the proposal status.
final_tally_result: Option<TallyResult>
final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal’s voting period has ended.
submit_time: Option<Timestamp>
submit_time is the time of proposal submission.
deposit_end_time: Option<Timestamp>
deposit_end_time is the end time for deposition.
total_deposit: Vec<Coin>
total_deposit is the total deposit on the proposal.
voting_start_time: Option<Timestamp>
voting_start_time is the starting time to vote on a proposal.
voting_end_time: Option<Timestamp>
voting_end_time is the end time of voting on a proposal.
metadata: String
metadata is any arbitrary metadata attached to the proposal.
title: String
title is the title of the proposal
Since: cosmos-sdk 0.47
summary: String
summary is a short summary of the proposal
Since: cosmos-sdk 0.47
proposer: String
Proposer is the address of the proposal sumbitter
Since: cosmos-sdk 0.47
Implementations§
Source§impl Proposal
impl Proposal
Sourcepub fn status(&self) -> ProposalStatus
pub fn status(&self) -> ProposalStatus
Returns the enum value of status
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: ProposalStatus)
pub fn set_status(&mut self, value: ProposalStatus)
Sets status
to the provided enum value.
Trait Implementations§
Source§impl Message for Proposal
impl Message for Proposal
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<M> NibiruProstMsg for Mwhere
M: Message,
impl<M> NibiruProstMsg for Mwhere
M: Message,
fn to_binary(&self) -> Binary
Source§fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
Name.type_url()
function. This method attempts
to downcast the message to prost::Name, and if successful, constructs a
CosmosMsg::Stargate
object corresponding to the type.