1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Node identity and iceoryx2 topic naming.
//!
//! The topic names derive from the [`NodeId`]; their format is part of the wire
//! contract shared with the Node.js gateway.
use *;
/// Compact identifier of an ice-rpc node on the iceoryx2 bus.
///
/// Corresponds to the PID of the host process, guaranteeing uniqueness
/// across processes on the same machine.
;
/// Converts an iceoryx2 raw process identifier to the unsigned value stored in
/// [`NodeId`].
///
/// iceoryx2 exposes a node's process id as a signed `pid_t`; an anomalous value
/// is mapped to `0` rather than wrapping into a plausible-looking but wrong id.
/// Generic over the input so it compiles whatever signedness `pid_t` has.
/// Converts the result of an iceoryx2 node id's `pid()` call into the unsigned
/// value stored in [`NodeId`].
///
/// Since iceoryx2 0.10 a service's `UniqueIdGenerator` may legitimately not
/// provide a process id (a custom generator returns `NotImplemented`), so
/// `UniqueNodeId::pid()` yields a `Result`; a missing or anomalous value is
/// mapped to `0`, the same sentinel [`raw_pid_to_u32`] uses.
pub