Struct dao::voting::voting_engine::voting_state_machine::VotingSummary
source · pub struct VotingSummary { /* private fields */ }
Expand description
Serializable finished Voting summary.
Implementations§
source§impl VotingSummary
impl VotingSummary
sourcepub fn new(result: VotingResult, ty: VotingType, voting_id: VotingId) -> Self
pub fn new(result: VotingResult, ty: VotingType, voting_id: VotingId) -> Self
Creates a new instance of VotingSummary
.
sourcepub fn is_voting_process_finished(&self) -> bool
pub fn is_voting_process_finished(&self) -> bool
Indicates if the voting process is completed.
sourcepub fn result(&self) -> VotingResult
pub fn result(&self) -> VotingResult
Returns voting result.
sourcepub fn voting_type(&self) -> VotingType
pub fn voting_type(&self) -> VotingType
Gets the voting type.
Trait Implementations§
source§impl BorshDeserialize for VotingSummary
impl BorshDeserialize for VotingSummary
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 BorshSerialize for VotingSummary
impl BorshSerialize for VotingSummary
source§impl Clone for VotingSummary
impl Clone for VotingSummary
source§fn clone(&self) -> VotingSummary
fn clone(&self) -> VotingSummary
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for VotingSummary
impl Send for VotingSummary
impl Sync for VotingSummary
impl Unpin for VotingSummary
impl UnwindSafe for VotingSummary
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