30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
|
|
//! Single definitions of the data-plane identifier newtypes.
|
||
|
|
//!
|
||
|
|
//! Every module — and the iroh-driver edge transport — re-exports these, so
|
||
|
|
//! edge, ring, arena, and wire code share one vocabulary instead of defining
|
||
|
|
//! structurally identical `u64` newtypes and re-wrapping them at every crate
|
||
|
|
//! boundary.
|
||
|
|
|
||
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||
|
|
pub struct RunId(pub u64);
|
||
|
|
|
||
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||
|
|
pub struct NodeId(pub u64);
|
||
|
|
|
||
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||
|
|
pub struct EdgeId(pub u64);
|
||
|
|
|
||
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||
|
|
pub struct RingId(pub u64);
|
||
|
|
|
||
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||
|
|
pub struct StreamId(pub u64);
|
||
|
|
|
||
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||
|
|
pub struct LeaseRequestId(pub u64);
|
||
|
|
|
||
|
|
/// Data-plane-local actor address for edge endpoints. Distinct from the
|
||
|
|
/// swactor runtime's actor address; the application maps between them.
|
||
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||
|
|
pub struct ActorAddress(pub u64);
|