Struct network::testutils::test_node::InboundNetworkHandle [−][src]
pub struct InboundNetworkHandle {
pub inbound_message_sender: InboundMessageSender,
pub connection_update_sender: ConnectionUpdateSender,
pub peer_metadata_storage: Arc<PeerMetadataStorage>,
}Expand description
A connection handle describing the network for a node.
Use this to interact with the node
Fields
inbound_message_sender: InboundMessageSenderTo send new incoming network messages
connection_update_sender: ConnectionUpdateSenderTo send new incoming connections or disconnections
peer_metadata_storage: Arc<PeerMetadataStorage>To update the local state (normally done by peer manager)
Implementations
pub fn connect(
&self,
role: RoleType,
self_peer_network_id: PeerNetworkId,
conn_metadata: ConnectionMetadata
)
pub fn connect(
&self,
role: RoleType,
self_peer_network_id: PeerNetworkId,
conn_metadata: ConnectionMetadata
)
Push connection update, and update the local storage
pub fn disconnect(
&self,
role: RoleType,
self_peer_network_id: PeerNetworkId,
conn_metadata: ConnectionMetadata
)
pub fn disconnect(
&self,
role: RoleType,
self_peer_network_id: PeerNetworkId,
conn_metadata: ConnectionMetadata
)
Push disconnect update, and update the local storage
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for InboundNetworkHandle
impl Send for InboundNetworkHandle
impl Sync for InboundNetworkHandle
impl Unpin for InboundNetworkHandle
impl UnwindSafe for InboundNetworkHandle
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self