#[non_exhaustive]pub struct ProposalState {
pub proposals: BTreeMap<String, ProposalRecord>,
pub accepts: BTreeMap<String, String>,
pub terminal_rejections: Vec<TerminalRejectRecord>,
pub rejections: Vec<RejectRecord>,
pub phase: ProposalPhase,
}Expand description
The proposal mode’s whole serialized mode_state.
#[non_exhaustive] for the reason on ProposalRecord — and this is the
struct that demonstrates it, having already grown
rejections and phase after the fact.
Default is still derived and still reachable from other crates
(ProposalState::default()); #[non_exhaustive] refuses only the
struct-literal form, including ProposalState { ..Default::default() }.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.proposals: BTreeMap<String, ProposalRecord>§accepts: BTreeMap<String, String>§terminal_rejections: Vec<TerminalRejectRecord>§rejections: Vec<RejectRecord>All rejections (terminal and non-terminal) for audit trail.
phase: ProposalPhaseTrait Implementations§
Source§impl Clone for ProposalState
impl Clone for ProposalState
Source§impl Debug for ProposalState
impl Debug for ProposalState
Source§impl Default for ProposalState
impl Default for ProposalState
Source§impl<'de> Deserialize<'de> for ProposalState
impl<'de> Deserialize<'de> for ProposalState
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
Auto Trait Implementations§
impl Freeze for ProposalState
impl RefUnwindSafe for ProposalState
impl Send for ProposalState
impl Sync for ProposalState
impl Unpin for ProposalState
impl UnsafeUnpin for ProposalState
impl UnwindSafe for ProposalState
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