[][src]Trait sunshine_util::traits::ApplyVote

pub trait ApplyVote: GetVoteOutcome {
    type Direction;
    type Vote: VoteVector<Self::Signal, Self::Direction>;
    type State: Approved + Apply<Self::Vote> + Revert<Self::Vote>;
    fn apply_vote(
        state: Self::State,
        new_vote: Self::Vote,
        old_vote: Option<Self::Vote>
    ) -> Result<Self::State, DispatchError>; }

Applies vote in the context of the existing module instance

Associated Types

type Direction

type Vote: VoteVector<Self::Signal, Self::Direction>

type State: Approved + Apply<Self::Vote> + Revert<Self::Vote>

Loading content...

Required methods

fn apply_vote(
    state: Self::State,
    new_vote: Self::Vote,
    old_vote: Option<Self::Vote>
) -> Result<Self::State, DispatchError>

Loading content...

Implementors

Loading content...