pub struct Ballot {
pub voter: Address,
pub voting_id: VotingId,
pub voting_type: VotingType,
pub choice: Choice,
pub stake: Balance,
pub unbound: bool,
pub canceled: bool,
}
Expand description
Represents user’s vote.
Fields§
§voter: Address
The voter’s address.
voting_id: VotingId
A unique voting id.
voting_type: VotingType
Voting type.
choice: Choice
Selected option.
stake: Balance
Vote power.
unbound: bool
Indicates if the vote counts in the total voting stake.
canceled: bool
Indicates if it reverts the previous ballot casted by the voter.
Implementations§
Trait Implementations§
source§impl BorshDeserialize for Ballot
impl BorshDeserialize for Ballot
source§fn deserialize(buf: &mut &[u8]) -> Result<Self>
fn deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
source§impl From<Ballot> for ShortenedBallot
impl From<Ballot> for ShortenedBallot
Auto Trait Implementations§
impl RefUnwindSafe for Ballot
impl Send for Ballot
impl Sync for Ballot
impl Unpin for Ballot
impl UnwindSafe for Ballot
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