RemovalReason

Enum RemovalReason 

#[repr(i32)]
pub enum RemovalReason { Unspecified = 0, Undercollateralized = 1, InvalidReduceOnly = 2, PostOnlyWouldCrossMakerOrder = 3, InvalidSelfTrade = 4, ConditionalFokCouldNotBeFullyFilled = 5, ConditionalIocWouldRestOnBook = 6, FullyFilled = 7, ViolatesIsolatedSubaccountConstraints = 8, PermissionedKeyExpired = 9, }

Variants§

§

Unspecified = 0

REMOVAL_REASON_UNSPECIFIED represents an unspecified removal reason. This removal reason is used as a catchall and should never appear on an OrderRemoval in the operations queue.

§

Undercollateralized = 1

REMOVAL_REASON_UNDERCOLLATERALIZED represents a removal of an order which if filled in isolation with respect to the current state of the subaccount would leave the subaccount undercollateralized.

§

InvalidReduceOnly = 2

REMOVAL_REASON_INVALID_REDUCE_ONLY represents a removal of a reduce-only order which if filled in isolation with respect to the current state of the subaccount would cause the subaccount’s existing position to increase or change sides.

§

PostOnlyWouldCrossMakerOrder = 3

REMOVAL_REASON_POST_ONLY_WOULD_CROSS_MAKER_ORDER represents a removal of a stateful post-only order that was deemed invalid because it crossed maker orders on the book of the proposer.

§

InvalidSelfTrade = 4

REMOVAL_REASON_INVALID_SELF_TRADE represents a removal of a stateful order that was deemed invalid because it constituted a self trade on the proposers orderbook.

§

ConditionalFokCouldNotBeFullyFilled = 5

REMOVAL_REASON_CONDITIONAL_FOK_COULD_NOT_BE_FULLY_FILLED represents a removal of a conditional FOK order that was deemed invalid because it could not be completely filled. Conditional FOK orders should always be fully-filled or removed in the block after they are triggered.

§

ConditionalIocWouldRestOnBook = 6

REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK represents a removal of a conditional IOC order. Conditional IOC orders should always have their remaining size removed in the block after they are triggered.

§

FullyFilled = 7

REMOVAL_REASON_FULLY_FILLED represents a removal of an order that was fully filled and should therefore be removed from state.

§

ViolatesIsolatedSubaccountConstraints = 8

REMOVAL_REASON_FULLY_FILLED represents a removal of an order that would lead to the subaccount violating isolated subaccount constraints.

§

PermissionedKeyExpired = 9

REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED represents a removal of an order that was placed using an expired permissioned key.

Implementations§

§

impl RemovalReason

pub fn is_valid(value: i32) -> bool

Returns true if value is a variant of RemovalReason.

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

👎Deprecated: Use the TryFrom<i32> implementation instead

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

§

impl RemovalReason

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

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

Trait Implementations§

§

impl Clone for RemovalReason

§

fn clone(&self) -> RemovalReason

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 RemovalReason

§

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

Formats the value using the given formatter. Read more
§

impl Default for RemovalReason

§

fn default() -> RemovalReason

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

impl Hash for RemovalReason

§

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 RemovalReason

§

fn cmp(&self, other: &RemovalReason) -> 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 RemovalReason

§

fn eq(&self, other: &RemovalReason) -> 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 RemovalReason

§

fn partial_cmp(&self, other: &RemovalReason) -> 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 RemovalReason

§

type Error = UnknownEnumValue

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

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

Performs the conversion.
§

impl Copy for RemovalReason

§

impl Eq for RemovalReason

§

impl StructuralPartialEq for RemovalReason

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,