#[repr(i32)]pub enum ProposalStatus {
Unspecified,
DepositPeriod,
VotingPeriod,
Passed,
Rejected,
Failed,
}
Expand description
ProposalStatus enumerates the valid statuses of a proposal.
Variants§
Unspecified
PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.
DepositPeriod
PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period.
VotingPeriod
PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period.
Passed
PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed.
Rejected
PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected.
Failed
PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed.
Implementations§
source§impl ProposalStatus
impl ProposalStatus
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for ProposalStatus
impl Clone for ProposalStatus
source§fn clone(&self) -> ProposalStatus
fn clone(&self) -> ProposalStatus
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProposalStatus
impl Debug for ProposalStatus
source§impl Default for ProposalStatus
impl Default for ProposalStatus
source§fn default() -> ProposalStatus
fn default() -> ProposalStatus
source§impl From<ProposalStatus> for i32
impl From<ProposalStatus> for i32
source§fn from(value: ProposalStatus) -> i32
fn from(value: ProposalStatus) -> i32
source§impl Hash for ProposalStatus
impl Hash for ProposalStatus
source§impl Ord for ProposalStatus
impl Ord for ProposalStatus
source§fn cmp(&self, other: &ProposalStatus) -> Ordering
fn cmp(&self, other: &ProposalStatus) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<ProposalStatus> for ProposalStatus
impl PartialEq<ProposalStatus> for ProposalStatus
source§fn eq(&self, other: &ProposalStatus) -> bool
fn eq(&self, other: &ProposalStatus) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ProposalStatus> for ProposalStatus
impl PartialOrd<ProposalStatus> for ProposalStatus
source§fn partial_cmp(&self, other: &ProposalStatus) -> Option<Ordering>
fn partial_cmp(&self, other: &ProposalStatus) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ProposalStatus
impl Eq for ProposalStatus
impl StructuralEq for ProposalStatus
impl StructuralPartialEq for ProposalStatus
Auto Trait Implementations§
impl RefUnwindSafe for ProposalStatus
impl Send for ProposalStatus
impl Sync for ProposalStatus
impl Unpin for ProposalStatus
impl UnwindSafe for ProposalStatus
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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