pub struct Fees<T> {
pub performance: Fee<T>,
pub management: Fee<T>,
pub max_total_assets_growth_rate: Option<T>,
}Expand description
Collection of fees for a vault.
This generic type uses Fee<T> with string recipients.
For spec-compliant types, see FeesSpec.
Fields§
§performance: Fee<T>Performance fee (charged on profits).
management: Fee<T>Management fee (charged over time).
max_total_assets_growth_rate: Option<T>Optional cap on how fast total_assets is allowed to grow for fee accrual.
Interpreted as an annualized WAD rate (1e18 = 100% per year). When set,
fee accrual uses min(cur_total_assets, last_total_assets * (1 + max_rate * dt / YEAR))
as the effective cur_total_assets.
Implementations§
Trait Implementations§
Source§impl<T> BorshDeserialize for Fees<T>where
T: BorshDeserialize,
impl<T> BorshDeserialize for Fees<T>where
T: BorshDeserialize,
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<'de, T> Deserialize<'de> for Fees<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Fees<T>where
T: Deserialize<'de>,
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<T: Eq> Eq for Fees<T>
impl<T> StructuralPartialEq for Fees<T>
Auto Trait Implementations§
impl<T> Freeze for Fees<T>where
T: Freeze,
impl<T> RefUnwindSafe for Fees<T>where
T: RefUnwindSafe,
impl<T> Send for Fees<T>where
T: Send,
impl<T> Sync for Fees<T>where
T: Sync,
impl<T> Unpin for Fees<T>where
T: Unpin,
impl<T> UnwindSafe for Fees<T>where
T: UnwindSafe,
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