Enum ManifestInstruction

Source
#[repr(u8)]
pub enum ManifestInstruction {
Show 14 variants CreateMarket = 0, ClaimSeat = 1, Deposit = 2, Withdraw = 3, Swap = 4, Expand = 5, BatchUpdate = 6, GlobalCreate = 7, GlobalAddTrader = 8, GlobalDeposit = 9, GlobalWithdraw = 10, GlobalEvict = 11, GlobalClean = 12, SwapV2 = 13,
}
Expand description

Instructions available for the Manifest program

Variants§

§

CreateMarket = 0

Create a market

§

ClaimSeat = 1

Allocate a seat

§

Deposit = 2

Deposit

§

Withdraw = 3

Withdraw

§

Swap = 4

Places an order using funds in a wallet instead of on deposit

§

Expand = 5

Expand a market.

This is not used in normal operations because expansion happens within instructions that could require it. This is useful for when rent payer != transaction signer.

§

BatchUpdate = 6

Batch update with multiple place orders and cancels.

§

GlobalCreate = 7

Create global account for a given token.

§

GlobalAddTrader = 8

Add a trader to the global account.

§

GlobalDeposit = 9

Deposit into global account for a given token.

§

GlobalWithdraw = 10

Withdraw from global account for a given token.

§

GlobalEvict = 11

Evict another trader from the global account.

§

GlobalClean = 12

Removes an order from a market that cannot be filled. There are 3 reasons. It is expired, the global trader got evicted, or the global trader no longer has deposited the funds to back the order. This function results in cleaner orderbooks which helps reduce variance and thus compute unit estimates for traders. It is incentivized by receiving gas prepayment deposits. This is not required for normal operation of market. It exists as a deterrent to unfillable and unmaintained global spam.

§

SwapV2 = 13

Places an order using funds in a wallet instead of on deposit. Separates the owner of the token accounts and the payer. This allows routers to swap and have intermediate hops go through PDAs, rather than all token accounts owned by the user.

Implementations§

Trait Implementations§

Source§

impl Clone for ManifestInstruction

Source§

fn clone(&self) -> ManifestInstruction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ManifestInstruction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ManifestInstruction

Source§

fn eq(&self, other: &ManifestInstruction) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u8> for ManifestInstruction

Source§

type Error = TryFromPrimitiveError<ManifestInstruction>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for ManifestInstruction

Source§

const NAME: &'static str = "ManifestInstruction"

Source§

type Primitive = u8

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Copy for ManifestInstruction

Source§

impl Eq for ManifestInstruction

Source§

impl StructuralPartialEq for ManifestInstruction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AbiExample for T

Source§

default fn example() -> T

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DerefOrBorrow<T> for T
where T: ?Sized,

Source§

impl<T> DerefOrBorrowMut<T> for T
where T: ?Sized,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V