pub enum CompetitionOrderStatusKind {
Open,
Scheduled,
Active,
Solved,
Executing,
Traded,
Cancelled,
}Expand description
Fine-grained lifecycle state of an order within the current batch auction.
Variants§
Open
Awaiting inclusion in an auction.
Scheduled
Scheduled to be executed.
Active
Currently being solved.
Solved
A solution including the order has been found.
Executing
The winning solution is being submitted on-chain.
Traded
The order has been traded on-chain.
Cancelled
The order has been cancelled.
Implementations§
Source§impl CompetitionOrderStatusKind
impl CompetitionOrderStatusKind
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Returns the camelCase string used by the CoW Protocol API.
Sourcepub const fn is_open(self) -> bool
pub const fn is_open(self) -> bool
Returns true if the order is awaiting inclusion in an auction.
Sourcepub const fn is_scheduled(self) -> bool
pub const fn is_scheduled(self) -> bool
Returns true if the order is scheduled to be executed.
Sourcepub const fn is_solved(self) -> bool
pub const fn is_solved(self) -> bool
Returns true if a solution including the order has been found.
Sourcepub const fn is_executing(self) -> bool
pub const fn is_executing(self) -> bool
Returns true if the winning solution is being submitted on-chain.
Sourcepub const fn is_cancelled(self) -> bool
pub const fn is_cancelled(self) -> bool
Returns true if the order has been cancelled.
Sourcepub const fn is_terminal(self) -> bool
pub const fn is_terminal(self) -> bool
Returns true if the order is in a terminal state (no further progression).
Terminal states are Self::Traded and Self::Cancelled.
Sourcepub const fn is_pending(self) -> bool
pub const fn is_pending(self) -> bool
Returns true if the order is still in a non-terminal state.
Pending states are all variants except Self::Traded and Self::Cancelled.
Trait Implementations§
Source§impl Clone for CompetitionOrderStatusKind
impl Clone for CompetitionOrderStatusKind
Source§fn clone(&self) -> CompetitionOrderStatusKind
fn clone(&self) -> CompetitionOrderStatusKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompetitionOrderStatusKind
impl Debug for CompetitionOrderStatusKind
Source§impl<'de> Deserialize<'de> for CompetitionOrderStatusKind
impl<'de> Deserialize<'de> for CompetitionOrderStatusKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompetitionOrderStatusKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompetitionOrderStatusKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for CompetitionOrderStatusKind
impl Display for CompetitionOrderStatusKind
Source§impl Serialize for CompetitionOrderStatusKind
impl Serialize for CompetitionOrderStatusKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<&str> for CompetitionOrderStatusKind
impl TryFrom<&str> for CompetitionOrderStatusKind
Source§fn try_from(
s: &str,
) -> Result<CompetitionOrderStatusKind, <CompetitionOrderStatusKind as TryFrom<&str>>::Error>
fn try_from( s: &str, ) -> Result<CompetitionOrderStatusKind, <CompetitionOrderStatusKind as TryFrom<&str>>::Error>
Parse a CompetitionOrderStatusKind from the CoW Protocol API string.
impl Copy for CompetitionOrderStatusKind
impl Eq for CompetitionOrderStatusKind
impl StructuralPartialEq for CompetitionOrderStatusKind
Auto Trait Implementations§
impl Freeze for CompetitionOrderStatusKind
impl RefUnwindSafe for CompetitionOrderStatusKind
impl Send for CompetitionOrderStatusKind
impl Sync for CompetitionOrderStatusKind
impl Unpin for CompetitionOrderStatusKind
impl UnsafeUnpin for CompetitionOrderStatusKind
impl UnwindSafe for CompetitionOrderStatusKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.