udp2p_traits 0.1.0

The peer discovery portion of the udp2p library, used for discovering peers in a peer to peer network
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::net::SocketAddr;
use udp2p_utils::utils::Distance;

pub trait Routable: Distance {
    type Id;
    type Key;

    fn get_id(&self) -> Self::Id;
    fn get_key(&self) -> Self::Key;
    fn get_address(&self) -> SocketAddr;
}