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
impl RemovalReason
§impl RemovalReason
impl RemovalReason
pub fn as_str_name(&self) -> &'static str
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>
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
impl Clone for RemovalReason
§fn clone(&self) -> RemovalReason
fn clone(&self) -> RemovalReason
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for RemovalReason
impl Debug for RemovalReason
§impl Default for RemovalReason
impl Default for RemovalReason
§fn default() -> RemovalReason
fn default() -> RemovalReason
§impl Hash for RemovalReason
impl Hash for RemovalReason
§impl Ord for RemovalReason
impl Ord for RemovalReason
§impl PartialEq for RemovalReason
impl PartialEq for RemovalReason
§impl PartialOrd for RemovalReason
impl PartialOrd for RemovalReason
§impl TryFrom<i32> for RemovalReason
impl TryFrom<i32> for RemovalReason
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
§fn try_from(value: i32) -> Result<RemovalReason, UnknownEnumValue>
fn try_from(value: i32) -> Result<RemovalReason, UnknownEnumValue>
impl Copy for RemovalReason
impl Eq for RemovalReason
impl StructuralPartialEq for RemovalReason
Auto Trait Implementations§
impl Freeze for RemovalReason
impl RefUnwindSafe for RemovalReason
impl Send for RemovalReason
impl Sync for RemovalReason
impl Unpin for RemovalReason
impl UnwindSafe for RemovalReason
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].