pub struct VaultConfig {
pub fees: FeesSpec,
pub min_withdrawal_assets: u128,
pub withdrawal_cooldown_ns: u64,
pub max_pending_withdrawals: u32,
pub paused: bool,
pub virtual_shares: u128,
pub virtual_assets: u128,
}Expand description
Static configuration for a vault.
These settings can typically only be changed through governance.
§Fee Recipients
Fee recipients are 32-byte addresses. Executors are responsible for mapping chain-native account identifiers (e.g., NEAR AccountId, Soroban Address) to this canonical 32-byte format, typically using a SHA256 hash.
Fields§
§fees: FeesSpec§min_withdrawal_assets: u128§withdrawal_cooldown_ns: u64§max_pending_withdrawals: u32§paused: bool§virtual_assets: u128Implementations§
Source§impl VaultConfig
impl VaultConfig
pub fn is_max_pending_valid(&self) -> bool
Trait Implementations§
Source§impl BorshDeserialize for VaultConfig
impl BorshDeserialize for VaultConfig
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 BorshSerialize for VaultConfig
impl BorshSerialize for VaultConfig
Source§impl Clone for VaultConfig
impl Clone for VaultConfig
Source§fn clone(&self) -> VaultConfig
fn clone(&self) -> VaultConfig
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 moreSource§impl Debug for VaultConfig
impl Debug for VaultConfig
Source§impl<'de> Deserialize<'de> for VaultConfig
impl<'de> Deserialize<'de> for VaultConfig
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
Source§impl PartialEq for VaultConfig
impl PartialEq for VaultConfig
Source§impl Serialize for VaultConfig
impl Serialize for VaultConfig
impl Copy for VaultConfig
impl Eq for VaultConfig
impl StructuralPartialEq for VaultConfig
Auto Trait Implementations§
impl Freeze for VaultConfig
impl RefUnwindSafe for VaultConfig
impl Send for VaultConfig
impl Sync for VaultConfig
impl Unpin for VaultConfig
impl UnwindSafe for VaultConfig
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