Struct ChannelInfo
pub struct ChannelInfo {
pub features: Features<ChannelContext>,
pub node_one: NodeId,
pub one_to_two: Option<ChannelUpdateInfo>,
pub node_two: NodeId,
pub two_to_one: Option<ChannelUpdateInfo>,
pub capacity_sats: Option<u64>,
pub announcement_message: Option<ChannelAnnouncement>,
/* private fields */
}Expand description
Details about a channel (both directions). Received within a channel announcement.
Fields§
§features: Features<ChannelContext>Protocol features of a channel communicated during its announcement
node_one: NodeIdSource node of the first direction of a channel
one_to_two: Option<ChannelUpdateInfo>Details about the first direction of a channel
node_two: NodeIdSource node of the second direction of a channel
two_to_one: Option<ChannelUpdateInfo>Details about the second direction of a channel
capacity_sats: Option<u64>The channel capacity as seen on-chain, if chain lookup is available.
announcement_message: Option<ChannelAnnouncement>An initial announcement of the channel Mostly redundant with the data we store in fields explicitly. Everything else is useful only for sending out for initial routing sync. Not stored if contains excess data to prevent DoS.
Implementations§
§impl ChannelInfo
impl ChannelInfo
pub fn as_directed_to(
&self,
target: &NodeId,
) -> Option<(DirectedChannelInfo<'_>, &NodeId)>
pub fn as_directed_to( &self, target: &NodeId, ) -> Option<(DirectedChannelInfo<'_>, &NodeId)>
Returns a DirectedChannelInfo for the channel directed to the given target from a
returned source, or None if target is not one of the channel’s counterparties.
pub fn as_directed_from(
&self,
source: &NodeId,
) -> Option<(DirectedChannelInfo<'_>, &NodeId)>
pub fn as_directed_from( &self, source: &NodeId, ) -> Option<(DirectedChannelInfo<'_>, &NodeId)>
Returns a DirectedChannelInfo for the channel directed from the given source to a
returned target, or None if source is not one of the channel’s counterparties.
pub fn get_directional_info(
&self,
channel_flags: u8,
) -> Option<&ChannelUpdateInfo>
pub fn get_directional_info( &self, channel_flags: u8, ) -> Option<&ChannelUpdateInfo>
Returns a ChannelUpdateInfo based on the direction implied by the channel_flag.
Trait Implementations§
§impl Clone for ChannelInfo
impl Clone for ChannelInfo
§fn clone(&self) -> ChannelInfo
fn clone(&self) -> ChannelInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ChannelInfo
impl Debug for ChannelInfo
§impl Display for ChannelInfo
impl Display for ChannelInfo
§impl PartialEq for ChannelInfo
impl PartialEq for ChannelInfo
§impl Readable for ChannelInfo
impl Readable for ChannelInfo
§fn read<R>(reader: &mut R) -> Result<ChannelInfo, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<ChannelInfo, DecodeError>where
R: Read,
Self in from the given Read.§impl Writeable for ChannelInfo
impl Writeable for ChannelInfo
impl Eq for ChannelInfo
impl StructuralPartialEq for ChannelInfo
Auto Trait Implementations§
impl Freeze for ChannelInfo
impl RefUnwindSafe for ChannelInfo
impl Send for ChannelInfo
impl Sync for ChannelInfo
impl Unpin for ChannelInfo
impl UnwindSafe for ChannelInfo
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T> AnySync for T
impl<T> AnySync for T
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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>
T in a tonic::Request§impl<T> MaybeReadable for Twhere
T: Readable,
impl<T> MaybeReadable for Twhere
T: Readable,
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.