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 BTreeMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut BTreeMap<Declaration, Definition>, )
Recursively, using DFS, add type definitions required for this type.
Type definition partially explains how to serialize/deserialize a type.
Source§impl BorshSerialize for FeeType
impl BorshSerialize for FeeType
impl StructuralPartialEq for FeeType
Auto Trait Implementations§
impl Freeze for FeeType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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