pub enum Choice {
Against,
InFavor,
}
Expand description
Choice enum, can be converted to bool using is_in_favor()
Variants§
Implementations§
source§impl Choice
impl Choice
pub fn is_in_favor(&self) -> bool
pub fn is_against(&self) -> bool
Trait Implementations§
source§impl BorshDeserialize for Choice
impl BorshDeserialize for Choice
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 PartialEq for Choice
impl PartialEq for Choice
impl Copy for Choice
impl Eq for Choice
impl StructuralPartialEq for Choice
Auto Trait Implementations§
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnwindSafe for Choice
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