Struct NullMessageRouter

Source
pub struct NullMessageRouter {}
Expand description

A special MessageRouter that performs no routing and does not create blinded paths. Its purpose is to enable the creation of Offers and Refunds without blinded paths, where the user’s node_id is used directly as the Destination.

§Note

NullMessageRouter must not be used as the type parameter for ChannelManager, since ChannelManager requires a functioning MessageRouter to create blinded paths, which are necessary for constructing reply paths in onion message communication. However, NullMessageRouter can still be passed as an argument to ChannelManager methods that accepts a MessageRouter, such as ChannelManager::create_offer_builder_using_router, when blinded paths are not needed.

Trait Implementations§

Source§

impl MessageRouter for NullMessageRouter

Source§

fn find_path( &self, _sender: PublicKey, _peers: Vec<PublicKey>, _destination: Destination, ) -> Result<OnionMessagePath, ()>

Returns a route for sending an OnionMessage to the given Destination.
Source§

fn create_blinded_paths<T: Signing + Verification>( &self, _recipient: PublicKey, _local_node_receive_key: ReceiveAuthKey, _context: MessageContext, _peers: Vec<MessageForwardNode>, _secp_ctx: &Secp256k1<T>, ) -> Result<Vec<BlindedMessagePath>, ()>

Creates BlindedMessagePaths to the recipient node. The nodes in peers are assumed to be direct peers with the recipient.

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V