#[repr(u8)]pub enum BoolWithLock {
FalseUnlocked = 0,
TrueUnlocked = 1,
FalseLocked = 2,
TrueLocked = 3,
}
Expand description
An enum representing a boolean flag which can be locked. Byte #0: 0 = Disabled, 1 = Enabled Byte #1: 0 = Unlocked, 1 = Locked
Variants§
Implementations§
Trait Implementations§
source§impl BorshDeserialize for BoolWithLock
impl BorshDeserialize for BoolWithLock
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
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.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for BoolWithLock
impl BorshSerialize for BoolWithLock
source§impl Clone for BoolWithLock
impl Clone for BoolWithLock
source§fn clone(&self) -> BoolWithLock
fn clone(&self) -> BoolWithLock
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 moresource§impl Debug for BoolWithLock
impl Debug for BoolWithLock
source§impl Default for BoolWithLock
impl Default for BoolWithLock
source§fn default() -> BoolWithLock
fn default() -> BoolWithLock
Returns the “default value” for a type. Read more
source§impl EnumExt for BoolWithLock
impl EnumExt for BoolWithLock
source§impl From<BoolWithLock> for u8
impl From<BoolWithLock> for u8
source§fn from(value: BoolWithLock) -> Self
fn from(value: BoolWithLock) -> Self
Converts to this type from the input type.
source§impl From<u8> for BoolWithLock
impl From<u8> for BoolWithLock
source§impl PartialEq for BoolWithLock
impl PartialEq for BoolWithLock
source§fn eq(&self, other: &BoolWithLock) -> bool
fn eq(&self, other: &BoolWithLock) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Space for BoolWithLock
impl Space for BoolWithLock
const INIT_SPACE: usize = 1usize
impl Copy for BoolWithLock
impl Eq for BoolWithLock
impl StructuralPartialEq for BoolWithLock
Auto Trait Implementations§
impl RefUnwindSafe for BoolWithLock
impl Send for BoolWithLock
impl Sync for BoolWithLock
impl Unpin for BoolWithLock
impl UnwindSafe for BoolWithLock
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.