pub enum PoolRequestInner {
Initialize(InitializePoolRequest),
GetBasket(PoolAction),
Execute(PoolAction),
}Variants§
Initialize(InitializePoolRequest)
Initialize a pool.
Accounts:
[writable]Pool account[writable]Pool token mint (PoolState::pool_token_mint)[writable]Pool vault account for each of the N pool assets (AssetInfo::vault_address)[]Pool vault authority (PoolState::vault_signer)[]LQD fee vault[]Initializer fee vault[]Rent sysvar[]/[writable]Any additional accounts needed to initialize the pool
GetBasket(PoolAction)
Get the creation, redemption, or swap basket.
Basket is written to the retbuf account as a Vec
Accounts:
[]Pool account[]Pool token mint (PoolState::pool_token_mint)[]Pool vault account for each of the N pool assets (AssetInfo::vault_address)[]Pool vault authority (PoolState::vault_signer)[writable]retbuf account[]retbuf program[]Accounts inPoolState::account_params
Execute(PoolAction)
Perform a creation, redemption, or swap.
Accounts:
[writable]Pool account[writable]Pool token mint (PoolState::pool_token_mint)[writable]Pool vault account for each of the N pool assets (AssetInfo::vault_address)[]Pool vault authority (PoolState::vault_signer)[writable]User pool token account[writable]User account for each of the N pool assets[signer]Authority for user accounts[writable]LQD fee vault[writable]Initializer fee vault[writable]Referrer fee vault[]spl-token program[]/[writable]Accounts inPoolState::account_params
Trait Implementations§
Source§impl BorshDeserialize for PoolRequestInner
impl BorshDeserialize for PoolRequestInner
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.
Source§fn is_u8() -> bool
fn is_u8() -> bool
Whether Self is u8.
NOTE:
Vec<u8> is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8> implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details.Source§impl BorshSchema for PoolRequestInner
impl BorshSchema for PoolRequestInner
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 PoolRequestInner
impl BorshSerialize for PoolRequestInner
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>
Source§fn try_to_vec(&self) -> Result<Vec<u8>, Error>
fn try_to_vec(&self) -> Result<Vec<u8>, Error>
Serialize this instance into a vector of bytes.
Source§fn is_u8() -> bool
fn is_u8() -> bool
Whether Self is u8.
NOTE:
Vec<u8> is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8> implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details.Source§impl Clone for PoolRequestInner
impl Clone for PoolRequestInner
Source§fn clone(&self) -> PoolRequestInner
fn clone(&self) -> PoolRequestInner
Returns a duplicate 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 PartialEq for PoolRequestInner
impl PartialEq for PoolRequestInner
impl Eq for PoolRequestInner
impl StructuralPartialEq for PoolRequestInner
Auto Trait Implementations§
impl Freeze for PoolRequestInner
impl RefUnwindSafe for PoolRequestInner
impl Send for PoolRequestInner
impl Sync for PoolRequestInner
impl Unpin for PoolRequestInner
impl UnwindSafe for PoolRequestInner
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