Enum switchboard_solana::program_id::stake::state::StakeStateV2
pub enum StakeStateV2 {
Uninitialized,
Initialized(Meta),
Stake(Meta, Stake, StakeFlags),
RewardsPool,
}
Variants§
Implementations§
Trait Implementations§
§impl BorshDeserialize for StakeStateV2
impl BorshDeserialize for StakeStateV2
fn deserialize_reader<R>(reader: &mut R) -> Result<StakeStateV2, Error>where
R: Read,
§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,
§impl BorshSerialize for StakeStateV2
impl BorshSerialize for StakeStateV2
§impl BorshDeserialize for StakeStateV2
impl BorshDeserialize for StakeStateV2
fn deserialize_reader<R>(reader: &mut R) -> Result<StakeStateV2, Error>where
R: Read,
§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,
§impl BorshSerialize for StakeStateV2
impl BorshSerialize for StakeStateV2
§impl Clone for StakeStateV2
impl Clone for StakeStateV2
§fn clone(&self) -> StakeStateV2
fn clone(&self) -> StakeStateV2
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 more§impl Debug for StakeStateV2
impl Debug for StakeStateV2
§impl Default for StakeStateV2
impl Default for StakeStateV2
§fn default() -> StakeStateV2
fn default() -> StakeStateV2
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for StakeStateV2
impl<'de> Deserialize<'de> for StakeStateV2
§fn deserialize<__D>(
__deserializer: __D
) -> Result<StakeStateV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<StakeStateV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for StakeStateV2
impl PartialEq for StakeStateV2
§fn eq(&self, other: &StakeStateV2) -> bool
fn eq(&self, other: &StakeStateV2) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for StakeStateV2
impl Serialize for StakeStateV2
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for StakeStateV2
impl StructuralPartialEq for StakeStateV2
Auto Trait Implementations§
impl Freeze for StakeStateV2
impl RefUnwindSafe for StakeStateV2
impl Send for StakeStateV2
impl Sync for StakeStateV2
impl Unpin for StakeStateV2
impl UnwindSafe for StakeStateV2
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more