pub struct ReadOnlyNetworkGraph<'a> { /* private fields */ }
Expand description
A read-only view of NetworkGraph
.
Implementations§
Source§impl ReadOnlyNetworkGraph<'_>
impl ReadOnlyNetworkGraph<'_>
Sourcepub fn channels(&self) -> &IndexedMap<u64, ChannelInfo>
pub fn channels(&self) -> &IndexedMap<u64, ChannelInfo>
Returns all known valid channels’ short ids along with announced channel info.
This is not exported to bindings users because we don’t want to return lifetime’d references
Sourcepub fn channel(&self, short_channel_id: u64) -> Option<&ChannelInfo>
pub fn channel(&self, short_channel_id: u64) -> Option<&ChannelInfo>
Returns information on a channel with the given id.
Sourcepub fn nodes(&self) -> &IndexedMap<NodeId, NodeInfo>
pub fn nodes(&self) -> &IndexedMap<NodeId, NodeInfo>
Returns all known nodes’ public keys along with announced node info.
This is not exported to bindings users because we don’t want to return lifetime’d references
Sourcepub fn node(&self, node_id: &NodeId) -> Option<&NodeInfo>
pub fn node(&self, node_id: &NodeId) -> Option<&NodeInfo>
Returns information on a node with the given id.
Sourcepub fn get_addresses(&self, pubkey: &PublicKey) -> Option<Vec<SocketAddress>>
pub fn get_addresses(&self, pubkey: &PublicKey) -> Option<Vec<SocketAddress>>
Get network addresses by node id. Returns None if the requested node is completely unknown, or if node announcement for the node was never received.
Auto Trait Implementations§
impl<'a> Freeze for ReadOnlyNetworkGraph<'a>
impl<'a> RefUnwindSafe for ReadOnlyNetworkGraph<'a>
impl<'a> !Send for ReadOnlyNetworkGraph<'a>
impl<'a> Sync for ReadOnlyNetworkGraph<'a>
impl<'a> Unpin for ReadOnlyNetworkGraph<'a>
impl<'a> UnwindSafe for ReadOnlyNetworkGraph<'a>
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