Trait network::testutils::test_node::ApplicationNode[][src]

pub trait ApplicationNode {
    fn node_id(&self) -> NodeId;
fn default_protocols(&self) -> &[ProtocolId];
fn get_inbound_handle(&self, network_id: NetworkId) -> InboundNetworkHandle;
fn add_inbound_handle_for_peer(
        &mut self,
        peer_network_id: PeerNetworkId,
        handle: InboundNetworkHandle
    );
fn get_inbound_handle_for_peer(
        &self,
        peer_network_id: PeerNetworkId
    ) -> InboundNetworkHandle;
fn get_outbound_handle(
        &mut self,
        network_id: NetworkId
    ) -> &mut OutboundMessageReceiver;
fn get_peer_metadata_storage(&self) -> &PeerMetadataStorage;
fn peer_network_ids(&self) -> &HashMap<NetworkId, PeerNetworkId>; }
Expand description

A trait defining an application specific node with networking abstracted

This is built as an abstract implementation of networking around a node

Required methods

Default [’ProtocolId`]s to connect with

For sending to this node. Generally should not be used after setup

For adding handles to other peers

For sending to other nodes

For receiving messages from other nodes

Implementors