#[repr(transparent)]pub struct QarPeerPresence(pub c_int);Expand description
@brief Whether a peer is here, as an application should act on it.
Two sources make it up: the hub’s own liveliness evidence (ONLINE / OFFLINE, which follows the peer’s session without the peer republishing anything), and the leave the peer itself announced on its way out (LEAVING / RETIRED), which outranks the evidence. Render for, wait for and count ONLINE peers, and UNKNOWN ones: a hub that has not reconciled a peer yet (or an older hub that never does) says nothing about it being gone. Stop at OFFLINE, LEAVING or RETIRED. Treat a value this header does not name as QAR_PEER_PRESENCE_UNKNOWN.
Tuple Fields§
§0: c_intImplementations§
Source§impl QarPeerPresence
impl QarPeerPresence
Sourcepub const QAR_PEER_PRESENCE_UNKNOWN: QarPeerPresence
pub const QAR_PEER_PRESENCE_UNKNOWN: QarPeerPresence
The hub has not reconciled this peer yet (an older hub that never does, or a hub that has just started). The peer has not announced a leave: treat it like ONLINE.
Sourcepub const QAR_PEER_PRESENCE_ONLINE: QarPeerPresence
pub const QAR_PEER_PRESENCE_ONLINE: QarPeerPresence
The hub sees the peer in the session.
Sourcepub const QAR_PEER_PRESENCE_OFFLINE: QarPeerPresence
pub const QAR_PEER_PRESENCE_OFFLINE: QarPeerPresence
The hub no longer sees the peer: a crash, a kill, a network loss or a short drop. It reads ONLINE again when it is back.
Sourcepub const QAR_PEER_PRESENCE_LEAVING: QarPeerPresence
pub const QAR_PEER_PRESENCE_LEAVING: QarPeerPresence
The peer announced it is leaving (a clean exit). It may come back under the same id, and reads ONLINE when it does.
Sourcepub const QAR_PEER_PRESENCE_RETIRED: QarPeerPresence
pub const QAR_PEER_PRESENCE_RETIRED: QarPeerPresence
The peer left for good and never comes back under its id.