primitives/types/identifiers/
mod.rs

1pub mod peer_id;
2pub mod protocol_info;
3pub mod session_id;
4
5pub use peer_id::PeerId;
6pub use protocol_info::ProtocolInfo;
7pub use session_id::SessionId;
8
9/// Arbitrary numerical identifier for peers running a circuit. Chosen by the circuit
10/// constructor. Allows assymetric behaviour in protocols / circuits.
11///
12/// WARNING: This does not (necessarily) match the `PeerId` ordering!
13pub type PeerNumber = u16;
14
15/// Local numerical identifier for other peers in my cluster. Stems from the lexicographic
16/// ordering of all the peer ids in the network. Used to index arrays containing elements
17/// (e.g., keys) for all other peer numbers in order.
18pub type PeerIndex = usize;