[][src]Struct vostok_dao::proposal::NewProposal

pub struct NewProposal {
    pub action: Action,
    pub description: String,
    pub voting_start: U64,
    pub voting_duration: u32,
    pub execute_before: U64,
}

NewProposal is an input to create a new Proposal. + voting_start must be after the current block number. + voting_duration must be between Contract.min_duration and Contract.max_duration. + execute_before is a last block number when the proposal can be closed and executed. Must be after voting_start + voting_duration.

Fields

action: Actiondescription: Stringvoting_start: U64

block number when voting started

voting_duration: u32

voting duration in number of blocks

execute_before: U64

last block number when the proposal can be executed. Must be bigger than voting_start + voting_duration

Implementations

impl NewProposal[src]

pub fn into_proposal(&self, min_duration: u32, max_duration: u32) -> Proposal[src]

Trait Implementations

impl<'de> Deserialize<'de> for NewProposal[src]

impl Serialize for NewProposal[src]

Auto Trait Implementations

impl RefUnwindSafe for NewProposal[src]

impl Send for NewProposal[src]

impl Sync for NewProposal[src]

impl Unpin for NewProposal[src]

impl UnwindSafe for NewProposal[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.