pub enum OrderGoal<IS: InstrumentSpec> {
CancelOrder(LocalOrderId),
CancelRevertOrder(LocalOrderId),
SubmitImmediatelyExecutableRemoteOrder {
local_order_id: LocalOrderId,
directional_intent_volume: DirectionalIntentVolume<IS>,
},
SubmitRestingRemoteOrder {
local_order_id: LocalOrderId,
directional_intent_volume: DirectionalIntentVolume<IS>,
},
}Variants§
CancelOrder(LocalOrderId)
Cancels any remaining potential exposure for an order that has not been matched yet. Does not revert partially filled or fully filled orders. After the goal is completed, there should be no potential exposure, however, there may be effective exposure due to a partial or a full fill that could not be canceled passively.
CancelRevertOrder(LocalOrderId)
Cancels any remaining potential exposure for an order that has not been matched yet. Aggressively reverts any partial fills fragments that are then received by the client. After the goal is completed, there should be no potential or effective exposure related to this order anymore.
SubmitImmediatelyExecutableRemoteOrder
Completes when the order is fully matched (fully filled only, not partially fill).
SubmitRestingRemoteOrder
Completes when the order is booked (resting, partially filled, or fully filled).
Implementations§
Source§impl<IS: InstrumentSpec> OrderGoal<IS>
impl<IS: InstrumentSpec> OrderGoal<IS>
pub fn new_submit_remote_with_execution_expectation( local_order_id: LocalOrderId, directional_intent_volume: DirectionalIntentVolume<IS>, order_execution_expectation: OrderExecutionExpectation, ) -> Self
pub fn as_order_execution_expectation( &self, ) -> Result<OrderExecutionExpectation, OrderGoalAsExecutionExpectationError>
pub fn as_local_order_id(&self) -> Result<&LocalOrderId, ()>
pub fn as_directional_intent_volume( &self, ) -> Result<&DirectionalIntentVolume<IS>, ()>
pub fn as_t(&self) -> OrderGoalT
Trait Implementations§
impl<IS: Copy + InstrumentSpec> Copy for OrderGoal<IS>
impl<IS: Eq + InstrumentSpec> Eq for OrderGoal<IS>
Source§impl<IS: InstrumentSpec> From<&OrderGoal<IS>> for OrderGoalT
impl<IS: InstrumentSpec> From<&OrderGoal<IS>> for OrderGoalT
Source§impl<IS: InstrumentSpec> From<OrderGoal<IS>> for OrderGoalT
impl<IS: InstrumentSpec> From<OrderGoal<IS>> for OrderGoalT
impl<IS: PartialEq + InstrumentSpec> StructuralPartialEq for OrderGoal<IS>
Auto Trait Implementations§
impl<IS> Freeze for OrderGoal<IS>
impl<IS> RefUnwindSafe for OrderGoal<IS>
impl<IS> Send for OrderGoal<IS>
impl<IS> Sync for OrderGoal<IS>
impl<IS> Unpin for OrderGoal<IS>
impl<IS> UnsafeUnpin for OrderGoal<IS>
impl<IS> UnwindSafe for OrderGoal<IS>
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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