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