Enum spl_stake_pool::state::FeeType
source · pub enum FeeType {
SolReferral(u8),
StakeReferral(u8),
Epoch(Fee),
StakeWithdrawal(Fee),
SolDeposit(Fee),
StakeDeposit(Fee),
SolWithdrawal(Fee),
}
Expand description
The type of fees that can be set on the stake pool
Variants§
SolReferral(u8)
Referral fees for SOL deposits
StakeReferral(u8)
Referral fees for stake deposits
Epoch(Fee)
Management fee paid per epoch
StakeWithdrawal(Fee)
Stake withdrawal fee
SolDeposit(Fee)
Deposit fee for SOL deposits
StakeDeposit(Fee)
Deposit fee for stake deposits
SolWithdrawal(Fee)
SOL withdrawal fee
Implementations§
source§impl FeeType
impl FeeType
sourcepub fn check_too_high(&self) -> Result<(), StakePoolError>
pub fn check_too_high(&self) -> Result<(), StakePoolError>
Checks if the provided fee is too high, returning an error if so
sourcepub fn can_only_change_next_epoch(&self) -> bool
pub fn can_only_change_next_epoch(&self) -> bool
Returns if the contained fee can only be updated earliest on the next epoch
Trait Implementations§
source§impl BorshDeserialize for FeeType
impl BorshDeserialize for FeeType
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 BorshSchema for FeeType
impl BorshSchema for FeeType
source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
source§fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definitions_recursively( definitions: &mut HashMap<Declaration, Definition> )
Recursively, using DFS, add type definitions required for this type. For primitive types
this is an empty map. Type definition explains how to serialize/deserialize a type.
source§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition>
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition> )
Helper method to add a single type definition to the map.
fn schema_container() -> BorshSchemaContainer
source§impl BorshSerialize for FeeType
impl BorshSerialize for FeeType
source§impl PartialEq for FeeType
impl PartialEq for FeeType
impl StructuralPartialEq for FeeType
Auto Trait Implementations§
impl RefUnwindSafe for FeeType
impl Send for FeeType
impl Sync for FeeType
impl Unpin for FeeType
impl UnwindSafe for FeeType
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