primitives/types/identifiers/
mod.rs

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