Skip to main content

primitives/types/identifiers/
mod.rs

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