Struct chain_impl_mockchain::update::UpdateState
source · pub struct UpdateState {
pub(crate) proposals: Hamt<DefaultHasher, UpdateProposalId, UpdateProposalState>,
}
Fields§
§proposals: Hamt<DefaultHasher, UpdateProposalId, UpdateProposalState>
Implementations§
source§impl UpdateState
impl UpdateState
pub fn new() -> Self
pub fn apply_proposal( self, proposal_id: UpdateProposalId, proposal: UpdateProposal, settings: &Settings, cur_date: BlockDate ) -> Result<Self, Error>
pub fn apply_vote( self, vote: &UpdateVote, settings: &Settings ) -> Result<Self, Error>
pub fn process_proposals( self, settings: Settings, prev_date: BlockDate, new_date: BlockDate ) -> (Self, Settings)
pub fn proposals(&self) -> HashMap<UpdateProposalId, UpdateProposalState>
Trait Implementations§
source§impl Clone for UpdateState
impl Clone for UpdateState
source§fn clone(&self) -> UpdateState
fn clone(&self) -> UpdateState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UpdateState
impl Debug for UpdateState
source§impl Default for UpdateState
impl Default for UpdateState
source§impl PartialEq<UpdateState> for UpdateState
impl PartialEq<UpdateState> for UpdateState
source§fn eq(&self, other: &UpdateState) -> bool
fn eq(&self, other: &UpdateState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for UpdateState
impl StructuralEq for UpdateState
impl StructuralPartialEq for UpdateState
Auto Trait Implementations§
impl RefUnwindSafe for UpdateState
impl Send for UpdateState
impl Sync for UpdateState
impl Unpin for UpdateState
impl UnwindSafe for UpdateState
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