Struct ReadOnlyNetworkGraph
pub struct ReadOnlyNetworkGraph<'a> { /* private fields */ }
Expand description
A read-only view of NetworkGraph
.
Implementations§
§impl ReadOnlyNetworkGraph<'_>
impl ReadOnlyNetworkGraph<'_>
pub 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
pub 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.
pub 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
pub 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.
pub 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§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