pub enum PaymentSendFailure {
ParameterError(APIError),
PathParameterError(Vec<Result<(), APIError>>),
AllFailedResendSafe(Vec<APIError>),
DuplicatePayment,
PartialFailure {
results: Vec<Result<(), APIError>>,
failed_paths_retry: Option<RouteParameters>,
payment_id: PaymentId,
},
}
Expand description
If a payment fails to send with ChannelManager::send_payment_with_route
, it can be in one
of several states. This enum is returned as the Err() type describing which state the payment
is in, see the description of individual enum states for more.
Variants§
ParameterError(APIError)
A parameter which was passed to send_payment was invalid, preventing us from attempting to send the payment at all.
You can freely resend the payment in full (with the parameter error fixed).
Because the payment failed outright, no payment tracking is done and no
Event::PaymentPathFailed
or Event::PaymentFailed
events will be generated.
PathParameterError(Vec<Result<(), APIError>>)
A parameter in a single path which was passed to send_payment was invalid, preventing us from attempting to send the payment at all.
You can freely resend the payment in full (with the parameter error fixed).
Because the payment failed outright, no payment tracking is done and no
Event::PaymentPathFailed
or Event::PaymentFailed
events will be generated.
The results here are ordered the same as the paths in the route object which was passed to send_payment.
AllFailedResendSafe(Vec<APIError>)
All paths which were attempted failed to send, with no channel state change taking place. You can freely resend the payment in full (though you probably want to do so over different paths than the ones selected).
Because the payment failed outright, no payment tracking is done and no
Event::PaymentPathFailed
or Event::PaymentFailed
events will be generated.
DuplicatePayment
Indicates that a payment for the provided PaymentId
is already in-flight and has not
yet completed (i.e. generated an Event::PaymentSent
or Event::PaymentFailed
).
PartialFailure
Some paths that were attempted failed to send, though some paths may have succeeded. At least some paths have irrevocably committed to the HTLC.
The results here are ordered the same as the paths in the route object that was passed to send_payment.
Any entries that contain Err(APIError::MonitorUpdateInprogress)
will send once a
MonitorEvent::Completed
is provided for the next-hop channel with the latest update_id.
Fields
results: Vec<Result<(), APIError>>
The errors themselves, in the same order as the paths from the route.
failed_paths_retry: Option<RouteParameters>
If some paths failed without irrevocably committing to the new HTLC(s), this will
contain a RouteParameters
object for the failing paths.
Trait Implementations§
§impl Clone for PaymentSendFailure
impl Clone for PaymentSendFailure
§fn clone(&self) -> PaymentSendFailure
fn clone(&self) -> PaymentSendFailure
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for PaymentSendFailure
impl Debug for PaymentSendFailure
§impl PartialEq for PaymentSendFailure
impl PartialEq for PaymentSendFailure
impl Eq for PaymentSendFailure
impl StructuralPartialEq for PaymentSendFailure
Auto Trait Implementations§
impl Freeze for PaymentSendFailure
impl RefUnwindSafe for PaymentSendFailure
impl Send for PaymentSendFailure
impl Sync for PaymentSendFailure
impl Unpin for PaymentSendFailure
impl UnwindSafe for PaymentSendFailure
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