#[repr(i32)]pub enum FailureCode {
Show 29 variants
Reserved = 0,
IncorrectOrUnknownPaymentDetails = 1,
IncorrectPaymentAmount = 2,
FinalIncorrectCltvExpiry = 3,
FinalIncorrectHtlcAmount = 4,
FinalExpiryTooSoon = 5,
InvalidRealm = 6,
ExpiryTooSoon = 7,
InvalidOnionVersion = 8,
InvalidOnionHmac = 9,
InvalidOnionKey = 10,
AmountBelowMinimum = 11,
FeeInsufficient = 12,
IncorrectCltvExpiry = 13,
ChannelDisabled = 14,
TemporaryChannelFailure = 15,
RequiredNodeFeatureMissing = 16,
RequiredChannelFeatureMissing = 17,
UnknownNextPeer = 18,
TemporaryNodeFailure = 19,
PermanentNodeFailure = 20,
PermanentChannelFailure = 21,
ExpiryTooFar = 22,
MppTimeout = 23,
InvalidOnionPayload = 24,
InvalidOnionBlinding = 25,
InternalFailure = 997,
UnknownFailure = 998,
UnreadableFailure = 999,
}Variants§
Reserved = 0
The numbers assigned in this enumeration match the failure codes as defined in BOLT #4. Because protobuf 3 requires enums to start with 0, a RESERVED value is added.
IncorrectOrUnknownPaymentDetails = 1
IncorrectPaymentAmount = 2
FinalIncorrectCltvExpiry = 3
FinalIncorrectHtlcAmount = 4
FinalExpiryTooSoon = 5
InvalidRealm = 6
ExpiryTooSoon = 7
InvalidOnionVersion = 8
InvalidOnionHmac = 9
InvalidOnionKey = 10
AmountBelowMinimum = 11
FeeInsufficient = 12
IncorrectCltvExpiry = 13
ChannelDisabled = 14
TemporaryChannelFailure = 15
RequiredNodeFeatureMissing = 16
RequiredChannelFeatureMissing = 17
UnknownNextPeer = 18
TemporaryNodeFailure = 19
PermanentNodeFailure = 20
PermanentChannelFailure = 21
ExpiryTooFar = 22
MppTimeout = 23
InvalidOnionPayload = 24
InvalidOnionBlinding = 25
InternalFailure = 997
An internal error occurred.
UnknownFailure = 998
The error source is known, but the failure itself couldn’t be decoded.
UnreadableFailure = 999
An unreadable failure result is returned if the received failure message cannot be decrypted. In that case the error source is unknown.
Implementations§
Source§impl FailureCode
impl FailureCode
Source§impl FailureCode
impl FailureCode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for FailureCode
impl Clone for FailureCode
Source§fn clone(&self) -> FailureCode
fn clone(&self) -> FailureCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FailureCode
impl Debug for FailureCode
Source§impl Default for FailureCode
impl Default for FailureCode
Source§fn default() -> FailureCode
fn default() -> FailureCode
Returns the “default value” for a type. Read more
Source§impl From<FailureCode> for i32
impl From<FailureCode> for i32
Source§fn from(value: FailureCode) -> i32
fn from(value: FailureCode) -> i32
Converts to this type from the input type.
Source§impl Hash for FailureCode
impl Hash for FailureCode
Source§impl Ord for FailureCode
impl Ord for FailureCode
Source§fn cmp(&self, other: &FailureCode) -> Ordering
fn cmp(&self, other: &FailureCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FailureCode
impl PartialEq for FailureCode
Source§impl PartialOrd for FailureCode
impl PartialOrd for FailureCode
Source§impl TryFrom<i32> for FailureCode
impl TryFrom<i32> for FailureCode
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<FailureCode, UnknownEnumValue>
fn try_from(value: i32) -> Result<FailureCode, UnknownEnumValue>
Performs the conversion.
impl Copy for FailureCode
impl Eq for FailureCode
impl StructuralPartialEq for FailureCode
Auto Trait Implementations§
impl Freeze for FailureCode
impl RefUnwindSafe for FailureCode
impl Send for FailureCode
impl Sync for FailureCode
impl Unpin for FailureCode
impl UnwindSafe for FailureCode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request