pub trait PeerLookup: Send {
    fn connection_id(
        &self,
        peer_id: &PeerTokenPair
    ) -> Result<Option<String>, PeerLookupError>;
fn peer_id(
        &self,
        connection_id: &str
    ) -> Result<Option<PeerTokenPair>, PeerLookupError>; }
Expand description

The PeerLookup trait provides an interface for looking up details about individual peer connections.

Required methods

Retrieves the connection ID for a given peer ID, if found.

Errors

Returns a PeerLookupError if the connection ID cannot be retrieved.

Retrieves the peer ID for a given connection ID, if found.

Errors

Returns a PeerLookupError if the peer ID cannot be retrieved.

Implementors