OrderRemovalReason

Enum OrderRemovalReason 

#[repr(i32)]
pub enum OrderRemovalReason {
Show 16 variants Unspecified = 0, Expired = 1, UserCanceled = 2, Undercollateralized = 3, InternalError = 4, SelfTradeError = 5, PostOnlyWouldCrossMakerOrder = 6, ImmediateOrCancelWouldRestOnBook = 7, FokOrderCouldNotBeFullyFulled = 8, ReduceOnlyResize = 9, IndexerExpired = 10, Replaced = 11, FullyFilled = 12, EquityTier = 13, FinalSettlement = 14, ViolatesIsolatedSubaccountConstraints = 15,
}
Expand description

OrderRemovalReason is an enum of all the reasons an order was removed.

Variants§

§

Unspecified = 0

Default value, this is invalid and unused.

§

Expired = 1

The order was removed due to being expired.

§

UserCanceled = 2

The order was removed due to being canceled by a user.

§

Undercollateralized = 3

The order was removed due to being undercollateralized.

§

InternalError = 4

The order caused an internal error during order placement and was removed.

§

SelfTradeError = 5

The order would have matched against another order placed by the same subaccount and was removed.

§

PostOnlyWouldCrossMakerOrder = 6

The order would have matched against maker orders on the orderbook despite being a post-only order and was removed.

§

ImmediateOrCancelWouldRestOnBook = 7

The order was an ICO order and would have been placed on the orderbook as resting liquidity and was removed.

§

FokOrderCouldNotBeFullyFulled = 8

The order was a fill-or-kill order that could not be fully filled and was removed.

§

ReduceOnlyResize = 9

The order was a reduce-only order that was removed due to either:

  • being a taker order and fully-filling the order would flip the side of the subaccount’s position, in this case the remaining size of the order is removed
  • being a maker order resting on the book and being removed when either the subaccount’s position is closed or flipped sides
§

IndexerExpired = 10

The order should be expired, according to the Indexer’s cached data, but the Indexer has yet to receive a message to remove the order. In order to keep the data cached by the Indexer up-to-date and accurate, clear out the data if it’s expired by sending an order removal with this reason. Protocol should never send this reason to Indexer.

§

Replaced = 11

The order has been replaced.

§

FullyFilled = 12

The order has been fully-filled. Only sent by the Indexer for stateful orders.

§

EquityTier = 13

The order has been removed since the subaccount does not satisfy the equity tier requirements.

§

FinalSettlement = 14

The order has been removed since its ClobPair has entered final settlement.

§

ViolatesIsolatedSubaccountConstraints = 15

The order has been removed since filling it would lead to the subaccount violating isolated subaccount constraints.

Implementations§

§

impl OrderRemovalReason

pub fn is_valid(value: i32) -> bool

Returns true if value is a variant of OrderRemovalReason.

pub fn from_i32(value: i32) -> Option<OrderRemovalReason>

👎Deprecated: Use the TryFrom<i32> implementation instead

Converts an i32 to a OrderRemovalReason, or None if value is not a valid variant.

§

impl OrderRemovalReason

pub fn as_str_name(&self) -> &'static str

String value of the enum field names used in the ProtoBuf definition.

The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.

pub fn from_str_name(value: &str) -> Option<OrderRemovalReason>

Creates an enum from field names used in the ProtoBuf definition.

Trait Implementations§

§

impl Clone for OrderRemovalReason

§

fn clone(&self) -> OrderRemovalReason

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
§

impl Debug for OrderRemovalReason

§

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

Formats the value using the given formatter. Read more
§

impl Default for OrderRemovalReason

§

fn default() -> OrderRemovalReason

Returns the “default value” for a type. Read more
§

impl Hash for OrderRemovalReason

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for OrderRemovalReason

§

fn cmp(&self, other: &OrderRemovalReason) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for OrderRemovalReason

§

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

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

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

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

impl PartialOrd for OrderRemovalReason

§

fn partial_cmp(&self, other: &OrderRemovalReason) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl TryFrom<i32> for OrderRemovalReason

§

type Error = UnknownEnumValue

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

fn try_from(value: i32) -> Result<OrderRemovalReason, UnknownEnumValue>

Performs the conversion.
§

impl Copy for OrderRemovalReason

§

impl Eq for OrderRemovalReason

§

impl StructuralPartialEq for OrderRemovalReason

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> DynEq for T
where T: Eq + Any,

§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

§

impl<T> DynHash for T
where T: Hash + Any,

§

fn dyn_hash(&self, state: &mut dyn Hasher)

§

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

§

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

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

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

§

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

Compare self to key and return true if they are equal.
§

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

§

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

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

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

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

§

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
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<N> NodeTrait for N
where N: Copy + Ord + Hash,

§

impl<T> Ungil for T
where T: Send,