[][src]Struct vostok_dao::proposal::Proposal

pub struct Proposal {
    pub proposer: AccountId,
    pub description: String,
    pub action: ActionInt,
    pub voters: HashSet<AccountId>,
    pub voting_start: u64,
    pub voting_end: u64,
    pub votes_for: u32,
    pub votes_against: u32,
    pub execute_before: u64,
    pub executed: bool,
}

Fields

proposer: AccountIddescription: Stringaction: ActionIntvoters: HashSet<AccountId>voting_start: u64

block number when voting started

voting_end: u64votes_for: u32votes_against: u32execute_before: u64executed: bool

Implementations

impl Proposal[src]

pub fn vote(&mut self, voter: &Voter, vote_yes: bool)[src]

pub fn execute(&mut self, min_support: u32) -> Promise[src]

Trait Implementations

impl BorshDeserialize for Proposal where
    AccountId: BorshDeserialize,
    String: BorshDeserialize,
    ActionInt: BorshDeserialize,
    HashSet<AccountId>: BorshDeserialize,
    u64: BorshDeserialize,
    u64: BorshDeserialize,
    u32: BorshDeserialize,
    u32: BorshDeserialize,
    u64: BorshDeserialize,
    bool: BorshDeserialize
[src]

impl BorshSerialize for Proposal where
    AccountId: BorshSerialize,
    String: BorshSerialize,
    ActionInt: BorshSerialize,
    HashSet<AccountId>: BorshSerialize,
    u64: BorshSerialize,
    u64: BorshSerialize,
    u32: BorshSerialize,
    u32: BorshSerialize,
    u64: BorshSerialize,
    bool: BorshSerialize
[src]

impl From<Proposal> for ProposalOut[src]

Auto Trait Implementations

impl RefUnwindSafe for Proposal[src]

impl Send for Proposal[src]

impl Sync for Proposal[src]

impl Unpin for Proposal[src]

impl UnwindSafe for Proposal[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> From<T> for T[src]

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

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

type Output = T

Should always be Self

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.