pub enum PoolAction {
Create(u64),
Redeem(u64),
Swap(Vec<u64>),
}Variants§
Create(u64)
Create pool tokens by depositing assets into the pool.
Redeem(u64)
Redeem pool tokens by burning the token and receiving assets from the pool.
Swap(Vec<u64>)
Deposit assets into the pool and receive other assets from the pool.
Trait Implementations§
Source§impl BorshDeserialize for PoolAction
impl BorshDeserialize for PoolAction
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 PoolAction
impl BorshSchema for PoolAction
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 PoolAction
impl BorshSerialize for PoolAction
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 PoolAction
impl Clone for PoolAction
Source§fn clone(&self) -> PoolAction
fn clone(&self) -> PoolAction
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 PoolAction
impl PartialEq for PoolAction
impl Eq for PoolAction
impl StructuralPartialEq for PoolAction
Auto Trait Implementations§
impl Freeze for PoolAction
impl RefUnwindSafe for PoolAction
impl Send for PoolAction
impl Sync for PoolAction
impl Unpin for PoolAction
impl UnwindSafe for PoolAction
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