pub struct ReadOnlyNetworkGraph<'a> { /* private fields */ }
Expand description
A read-only view of NetworkGraph
.
Implementations
sourceimpl ReadOnlyNetworkGraph<'_>
impl ReadOnlyNetworkGraph<'_>
sourcepub fn channels(&self) -> &BTreeMap<u64, ChannelInfo>
pub fn channels(&self) -> &BTreeMap<u64, ChannelInfo>
Returns all known valid channels’ short ids along with announced channel info.
(C-not exported) because we have no mapping for BTreeMap
s
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) -> &BTreeMap<NodeId, NodeInfo>
pub fn nodes(&self) -> &BTreeMap<NodeId, NodeInfo>
Returns all known nodes’ public keys along with announced node info.
(C-not exported) because we have no mapping for BTreeMap
s
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<NetAddress>>
pub fn get_addresses(&self, pubkey: &PublicKey) -> Option<Vec<NetAddress>>
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> 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more