pub struct StakingConfig {
pub discriminator: [u8; 8],
pub version: u8,
pub bump: u8,
pub staking_mint: Address,
pub total_staked: u64,
pub staking_enabled: bool,
pub reward_count: u16,
pub reserved: [u8; 64],
}Fields§
§discriminator: [u8; 8]§version: u8§bump: u8§staking_mint: Address§total_staked: u64§staking_enabled: bool§reward_count: u16§reserved: [u8; 64]Implementations§
Trait Implementations§
Source§impl AccountDeserialize for StakingConfig
Available on crate feature anchor only.
impl AccountDeserialize for StakingConfig
Available on crate feature
anchor only.Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
Source§impl AccountSerialize for StakingConfig
Available on crate feature anchor only.
impl AccountSerialize for StakingConfig
Available on crate feature
anchor only.Source§impl BorshDeserialize for StakingConfig
impl BorshDeserialize for StakingConfig
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§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.
Source§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 StakingConfig
impl BorshSerialize for StakingConfig
Source§impl Clone for StakingConfig
impl Clone for StakingConfig
Source§impl Debug for StakingConfig
impl Debug for StakingConfig
Source§impl<'de> Deserialize<'de> for StakingConfig
impl<'de> Deserialize<'de> for StakingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StakingConfig
Source§impl Owner for StakingConfig
Available on crate feature anchor only.
impl Owner for StakingConfig
Available on crate feature
anchor only.Source§impl PartialEq for StakingConfig
impl PartialEq for StakingConfig
Source§impl Serialize for StakingConfig
impl Serialize for StakingConfig
impl StructuralPartialEq for StakingConfig
Source§impl<'a> TryFrom<&AccountInfo<'a>> for StakingConfig
impl<'a> TryFrom<&AccountInfo<'a>> for StakingConfig
Auto Trait Implementations§
impl Freeze for StakingConfig
impl RefUnwindSafe for StakingConfig
impl Send for StakingConfig
impl Sync for StakingConfig
impl Unpin for StakingConfig
impl UnsafeUnpin for StakingConfig
impl UnwindSafe for StakingConfig
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