[][src]Enum pallet_elections::Error

pub enum Error<T: Trait> {
    NotVoter,
    InactiveTarget,
    CannotReapPresenting,
    ReapGrace,
    InvalidReporterIndex,
    InvalidTargetIndex,
    InvalidVoteIndex,
    CannotRetractPresenting,
    RetractNonVoter,
    InvalidRetractionIndex,
    DuplicatedCandidate,
    InvalidCandidateSlot,
    InsufficientCandidateFunds,
    InsufficientPresenterFunds,
    ZeroDeposit,
    UnworthyCandidate,
    LeaderboardMustExist,
    NotPresentationPeriod,
    InvalidCandidate,
    DuplicatedPresentation,
    IncorrectTotal,
    InvalidVoterIndex,
    InsufficientVoterFunds,
    InsufficientLockedValue,
    TooManyVotes,
    ZeroCandidates,
    ApprovalPresentation,
    // some variants omitted
}

Error for the elections module.

Variants

NotVoter

Reporter must be a voter.

InactiveTarget

Target for inactivity cleanup must be active.

CannotReapPresenting

Cannot reap during presentation period.

ReapGrace

Cannot reap during grace period.

InvalidReporterIndex

Invalid reporter index.

InvalidTargetIndex

Invalid target index.

InvalidVoteIndex

Invalid vote index.

CannotRetractPresenting

Cannot retract when presenting.

RetractNonVoter

Cannot retract non-voter.

InvalidRetractionIndex

Invalid retraction index.

DuplicatedCandidate

Duplicate candidate submission.

InvalidCandidateSlot

Invalid candidate slot.

InsufficientCandidateFunds

Candidate has not enough funds.

InsufficientPresenterFunds

Presenter must have sufficient slashable funds.

ZeroDeposit

Stake deposited to present winner and be added to leaderboard should be non-zero.

UnworthyCandidate

Candidate not worthy of leaderboard.

LeaderboardMustExist

Leaderboard must exist while present phase active.

NotPresentationPeriod

Cannot present outside of presentation period.

InvalidCandidate

Presented candidate must be current.

DuplicatedPresentation

Duplicated presentation.

IncorrectTotal

Incorrect total.

InvalidVoterIndex

Invalid voter index.

InsufficientVoterFunds

New voter must have sufficient funds to pay the bond.

InsufficientLockedValue

Locked value must be more than limit.

TooManyVotes

Amount of candidate votes cannot exceed amount of candidates.

ZeroCandidates

Amount of candidates to receive approval votes should be non-zero.

ApprovalPresentation

No approval changes during presentation period.

Trait Implementations

impl<T: Trait> Debug for Error<T>[src]

impl<T: Trait> ModuleErrorMetadata for Error<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Error<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for Error<T> where
    T: Send
[src]

impl<T> Sync for Error<T> where
    T: Sync
[src]

impl<T> Unpin for Error<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Error<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithPostDispatchInfo for T where
    T: Into<DispatchError>, 
[src]