pub enum FailedMultipleLimitOrderBehavior {
FailOnInsufficientFundsAndAmendOnCross,
FailOnInsufficientFundsAndFailOnCross,
SkipOnInsufficientFundsAndAmendOnCross,
SkipOnInsufficientFundsAndFailOnCross,
}
Variants§
FailOnInsufficientFundsAndAmendOnCross
Orders will never cross the spread. Instead they will be amended to the closest non-crossing price. The entire transaction will fail if matching engine returns None for any order, which indicates an error.
If an order has insufficient funds, the entire transaction will fail.
FailOnInsufficientFundsAndFailOnCross
If any order crosses the spread or has insufficient funds, the entire transaction will fail.
SkipOnInsufficientFundsAndAmendOnCross
Orders will be skipped if the user has insufficient funds. Crossing orders will be amended to the closest non-crossing price.
SkipOnInsufficientFundsAndFailOnCross
Orders will be skipped if the user has insufficient funds. If any order crosses the spread, the entire transaction will fail.
Implementations§
Source§impl FailedMultipleLimitOrderBehavior
impl FailedMultipleLimitOrderBehavior
pub fn should_fail_on_cross(&self) -> bool
pub fn should_skip_orders_with_insufficient_funds(&self) -> bool
Trait Implementations§
Source§impl BorshDeserialize for FailedMultipleLimitOrderBehavior
impl BorshDeserialize for FailedMultipleLimitOrderBehavior
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
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.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Auto Trait Implementations§
impl Freeze for FailedMultipleLimitOrderBehavior
impl RefUnwindSafe for FailedMultipleLimitOrderBehavior
impl Send for FailedMultipleLimitOrderBehavior
impl Sync for FailedMultipleLimitOrderBehavior
impl Unpin for FailedMultipleLimitOrderBehavior
impl UnwindSafe for FailedMultipleLimitOrderBehavior
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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