pub enum PaymentState {
Created = 0,
Pending = 1,
Complete = 2,
Failed = 3,
TimedOut = 4,
Refundable = 5,
RefundPending = 6,
}
Expand description
The payment state of an individual payment.
Variants§
Created = 0
Pending = 1
§Receive Swaps
Covers the cases when
- the lockup tx is seen in the mempool or
- our claim tx is broadcast
When the claim tx is broadcast, claim_tx_id
is set in the swap.
§Send Swaps
This is the status when our lockup tx was broadcast
§Chain Swaps
This is the status when the user lockup tx was broadcast
§No swap data available
If no associated swap is found, this indicates the underlying tx is not confirmed yet.
Complete = 2
§Receive Swaps
Covers the case when the claim tx is confirmed.
§Send and Chain Swaps
This is the status when the claim tx is broadcast and we see it in the mempool.
§No swap data available
If no associated swap is found, this indicates the underlying tx is confirmed.
Failed = 3
§Receive Swaps
This is the status when the swap failed for any reason and the Receive could not complete.
§Send and Chain Swaps
This is the status when a swap refund was initiated and the refund tx is confirmed.
TimedOut = 4
§Send and Outgoing Chain Swaps
This covers the case when the swap state is still Created and the swap fails to reach the Pending state in time. The TimedOut state indicates the lockup tx should never be broadcast.
Refundable = 5
§Incoming Chain Swaps
This covers the case when the swap failed for any reason and there is a user lockup tx. The swap in this case has to be manually refunded with a provided Bitcoin address
RefundPending = 6
§Send and Chain Swaps
This is the status when a refund was initiated and/or our refund tx was broadcast
When the refund tx is broadcast, refund_tx_id
is set in the swap.
Trait Implementations§
source§impl Clone for PaymentState
impl Clone for PaymentState
source§fn clone(&self) -> PaymentState
fn clone(&self) -> PaymentState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PaymentState
impl Debug for PaymentState
source§impl FromSql for PaymentState
impl FromSql for PaymentState
source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl Hash for PaymentState
impl Hash for PaymentState
source§impl IntoDart for PaymentState
impl IntoDart for PaymentState
source§impl IntoIntoDart<PaymentState> for PaymentState
impl IntoIntoDart<PaymentState> for PaymentState
fn into_into_dart(self) -> PaymentState
source§impl PartialEq for PaymentState
impl PartialEq for PaymentState
source§impl Serialize for PaymentState
impl Serialize for PaymentState
source§impl ToSql for PaymentState
impl ToSql for PaymentState
impl Copy for PaymentState
impl Eq for PaymentState
impl IntoDartExceptPrimitive for PaymentState
impl StructuralPartialEq for PaymentState
Auto Trait Implementations§
impl Freeze for PaymentState
impl RefUnwindSafe for PaymentState
impl Send for PaymentState
impl Sync for PaymentState
impl Unpin for PaymentState
impl UnwindSafe for PaymentState
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§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<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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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