FailureCode

Enum FailureCode 

Source
pub enum FailureCode {
Show 28 variants RESERVED = 0, INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 1, INCORRECT_PAYMENT_AMOUNT = 2, FINAL_INCORRECT_CLTV_EXPIRY = 3, FINAL_INCORRECT_HTLC_AMOUNT = 4, FINAL_EXPIRY_TOO_SOON = 5, INVALID_REALM = 6, EXPIRY_TOO_SOON = 7, INVALID_ONION_VERSION = 8, INVALID_ONION_HMAC = 9, INVALID_ONION_KEY = 10, AMOUNT_BELOW_MINIMUM = 11, FEE_INSUFFICIENT = 12, INCORRECT_CLTV_EXPIRY = 13, CHANNEL_DISABLED = 14, TEMPORARY_CHANNEL_FAILURE = 15, REQUIRED_NODE_FEATURE_MISSING = 16, REQUIRED_CHANNEL_FEATURE_MISSING = 17, UNKNOWN_NEXT_PEER = 18, TEMPORARY_NODE_FAILURE = 19, PERMANENT_NODE_FAILURE = 20, PERMANENT_CHANNEL_FAILURE = 21, EXPIRY_TOO_FAR = 22, MPP_TIMEOUT = 23, INVALID_ONION_PAYLOAD = 24, INTERNAL_FAILURE = 997, UNKNOWN_FAILURE = 998, UNREADABLE_FAILURE = 999,
}
Expand description

Represent the possible failure reasons of an HTLCAttempt.

Variants§

§

RESERVED = 0

Reserved failure reason.

§

INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 1

Incorrect or unknown payment details.

§

INCORRECT_PAYMENT_AMOUNT = 2

Incorrect payment amount.

§

FINAL_INCORRECT_CLTV_EXPIRY = 3

Final incorrect CLTV expiry.

§

FINAL_INCORRECT_HTLC_AMOUNT = 4

Final incorrect HTLC amount.

§

FINAL_EXPIRY_TOO_SOON = 5

Final expiry too soon.

§

INVALID_REALM = 6

Invalid realm.

§

EXPIRY_TOO_SOON = 7

Expiry too soon.

§

INVALID_ONION_VERSION = 8

Invalid onion version.

§

INVALID_ONION_HMAC = 9

Invalid onion HMAC.

§

INVALID_ONION_KEY = 10

Invalid onion key.

§

AMOUNT_BELOW_MINIMUM = 11

Amount below minimum.

§

FEE_INSUFFICIENT = 12

Fee insufficient.

§

INCORRECT_CLTV_EXPIRY = 13

Incorrect CLTV expiry.

§

CHANNEL_DISABLED = 14

Channel disabled.

§

TEMPORARY_CHANNEL_FAILURE = 15

Temporary channel failure.

§

REQUIRED_NODE_FEATURE_MISSING = 16

Required node feature missing.

§

REQUIRED_CHANNEL_FEATURE_MISSING = 17

Required channel feature missing.

§

UNKNOWN_NEXT_PEER = 18

Unknown next peer.

§

TEMPORARY_NODE_FAILURE = 19

Temporary node failure.

§

PERMANENT_NODE_FAILURE = 20

Permanent node failure.

§

PERMANENT_CHANNEL_FAILURE = 21

Permanent channel failure.

§

EXPIRY_TOO_FAR = 22

Expiry too far.

§

MPP_TIMEOUT = 23

MPP timeout.

§

INVALID_ONION_PAYLOAD = 24

Invalid onion payload.

§

INTERNAL_FAILURE = 997

Internal failure.

§

UNKNOWN_FAILURE = 998

Unknown failure.

§

UNREADABLE_FAILURE = 999

An unreadable failure result is returned if the received failure message cannot be decrypted.

Trait Implementations§

Source§

impl Clone for FailureCode

Source§

fn clone(&self) -> FailureCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FailureCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FailureCode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for FailureCode

Source§

fn eq(&self, other: &FailureCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for FailureCode

Source§

impl StructuralPartialEq for FailureCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,