pub enum SwapStatus {
Show 17 variants
Created,
TransactionMempool,
TransactionConfirmed,
TransactionRefunded,
TransactionFailed,
TransactionClaimed,
TransactionServerMempool,
TransactionServerConfirmed,
InvoiceSet,
InvoicePending,
InvoicePaid,
InvoiceFailedToPay,
InvoiceExpired,
TransactionLockupFailed,
SwapExpired,
Error {
error: String,
},
Other(String),
}Expand description
All possible states of a Boltz swap.
Swaps progress through these states during their lifecycle.
Variants§
Created
Initial state when swap is created.
TransactionMempool
Lockup transaction detected in mempool.
TransactionConfirmed
Lockup transaction confirmed on-chain.
TransactionRefunded
Transaction refunded.
TransactionFailed
Transaction failed.
TransactionClaimed
Transaction claimed.
TransactionServerMempool
Server lockup transaction detected in mempool (chain swaps).
TransactionServerConfirmed
Server lockup transaction confirmed (chain swaps).
InvoiceSet
Lightning invoice has been set.
InvoicePending
Waiting for Lightning invoice payment.
InvoicePaid
Lightning invoice successfully paid.
InvoiceFailedToPay
Lightning invoice payment failed.
InvoiceExpired
Invoice expired.
TransactionLockupFailed
Lockup amount was insufficient (chain swaps).
SwapExpired
Swap expired - can be refunded.
Error
Swap failed with error.
Other(String)
An unrecognized status from the Boltz API.
Implementations§
Source§impl SwapStatus
impl SwapStatus
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Whether this status represents a terminal state (swap is done, no further action needed).
Trait Implementations§
Source§impl Clone for SwapStatus
impl Clone for SwapStatus
Source§fn clone(&self) -> SwapStatus
fn clone(&self) -> SwapStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SwapStatus
impl Debug for SwapStatus
Source§impl<'de> Deserialize<'de> for SwapStatus
impl<'de> Deserialize<'de> for SwapStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SwapStatus
impl PartialEq for SwapStatus
Source§fn eq(&self, other: &SwapStatus) -> bool
fn eq(&self, other: &SwapStatus) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SwapStatus
impl Serialize for SwapStatus
impl StructuralPartialEq for SwapStatus
Auto Trait Implementations§
impl Freeze for SwapStatus
impl RefUnwindSafe for SwapStatus
impl Send for SwapStatus
impl Sync for SwapStatus
impl Unpin for SwapStatus
impl UnsafeUnpin for SwapStatus
impl UnwindSafe for SwapStatus
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerSource§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<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request