Enum SendError

Source
pub enum SendError {
    Secp256k1(Error),
    TooBigPacket,
    TooFewBlindedHops,
    InvalidFirstHop,
    InvalidMessage,
    BufferFull,
    GetNodeIdFailed,
    BlindedPathAdvanceFailed,
}
Expand description

Errors that may occur when sending an onion message.

Variants§

§

Secp256k1(Error)

Errored computing onion message packet keys.

§

TooBigPacket

Because implementations such as Eclair will drop onion messages where the message packet exceeds 32834 bytes, we refuse to send messages where the packet exceeds this size.

§

TooFewBlindedHops

The provided Destination was an invalid BlindedPath, due to having fewer than two blinded hops.

§

InvalidFirstHop

Our next-hop peer was offline or does not support onion message forwarding.

§

InvalidMessage

Onion message contents must have a TLV type >= 64.

§

BufferFull

Our next-hop peer’s buffer was full or our total outbound buffer was full.

§

GetNodeIdFailed

Failed to retrieve our node id from the provided KeysInterface.

§

BlindedPathAdvanceFailed

We attempted to send to a blinded path where we are the introduction node, and failed to advance the blinded path to make the second hop the new introduction node. Either KeysInterface::ecdh failed, we failed to tweak the current blinding point to get the new blinding point, or we were attempting to send to ourselves.

Trait Implementations§

Source§

impl Debug for SendError

Source§

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

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

impl PartialEq for SendError

Source§

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

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

const 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 SendError

Source§

impl StructuralPartialEq for SendError

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.