pub struct Proposal {
pub proposal_id: u64,
pub content: Option<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>,
}
Expand description
Proposal defines the core field members of a governance proposal.
Fields§
§proposal_id: u64
proposal_id defines the unique id of the proposal.
content: Option<Any>
content is the proposal’s content.
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.
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>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
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>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
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>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self
.source§impl PartialEq for Proposal
impl PartialEq for Proposal
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§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request