Trait APeerManager
pub trait APeerManager {
Show 14 associated items
type Descriptor: SocketDescriptor;
type CMT: ChannelMessageHandler + ?Sized;
type CM: Deref<Target = Self::CMT>;
type RMT: RoutingMessageHandler + ?Sized;
type RM: Deref<Target = Self::RMT>;
type OMT: OnionMessageHandler + ?Sized;
type OM: Deref<Target = Self::OMT>;
type LT: Logger + ?Sized;
type L: Deref<Target = Self::LT>;
type CMHT: CustomMessageHandler + ?Sized;
type CMH: Deref<Target = Self::CMHT>;
type NST: NodeSigner + ?Sized;
type NS: Deref<Target = Self::NST>;
// Required method
fn as_ref(
&self,
) -> &PeerManager<Self::Descriptor, Self::CM, Self::RM, Self::OM, Self::L, Self::CMH, Self::NS>;
}
Expand description
A generic trait which is implemented for all PeerManager
s. This makes bounding functions or
structs on any PeerManager
much simpler as only this trait is needed as a bound, rather
than the full set of bounds on PeerManager
itself.
This is not exported to bindings users as general cover traits aren’t useful in other languages.
Required Associated Types§
type Descriptor: SocketDescriptor
type CMT: ChannelMessageHandler + ?Sized
type CM: Deref<Target = Self::CMT>
type RMT: RoutingMessageHandler + ?Sized
type RM: Deref<Target = Self::RMT>
type OMT: OnionMessageHandler + ?Sized
type OM: Deref<Target = Self::OMT>
type LT: Logger + ?Sized
type L: Deref<Target = Self::LT>
type CMHT: CustomMessageHandler + ?Sized
type CMH: Deref<Target = Self::CMHT>
type NST: NodeSigner + ?Sized
type NS: Deref<Target = Self::NST>
Required Methods§
fn as_ref(
&self,
) -> &PeerManager<Self::Descriptor, Self::CM, Self::RM, Self::OM, Self::L, Self::CMH, Self::NS>
fn as_ref( &self, ) -> &PeerManager<Self::Descriptor, Self::CM, Self::RM, Self::OM, Self::L, Self::CMH, Self::NS>
Gets a reference to the underlying PeerManager
.