pub struct ParticipantId(/* private fields */);Expand description
Identifies one caller process incarnation participating in an election.
Keep one ID for the lifetime of a process incarnation, then use a fresh ID after restart. Reusing an ID across concurrent callers is protocol misuse: fencing ranks preserve durable data safety, but the callers cannot safely coordinate leadership or protected work as one incarnation.
Implementations§
Source§impl ParticipantId
impl ParticipantId
Sourcepub const MAX_ENCODED_BYTES: usize = 95_000usize
pub const MAX_ENCODED_BYTES: usize = 95_000usize
Maximum tuple-encoded size of a process-incarnation ID.
The limit includes the tuple string type code, terminator, and escaping of embedded NUL bytes. It leaves enough space for the rest of the durable election state below FoundationDB’s 100,000-byte value limit.
Trait Implementations§
Source§impl Clone for ParticipantId
impl Clone for ParticipantId
Source§fn clone(&self) -> ParticipantId
fn clone(&self) -> ParticipantId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParticipantId
impl Debug for ParticipantId
Source§impl Hash for ParticipantId
impl Hash for ParticipantId
Source§impl Ord for ParticipantId
impl Ord for ParticipantId
Source§fn cmp(&self, other: &ParticipantId) -> Ordering
fn cmp(&self, other: &ParticipantId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ParticipantId
impl PartialEq for ParticipantId
Source§impl PartialOrd for ParticipantId
impl PartialOrd for ParticipantId
impl Eq for ParticipantId
impl StructuralPartialEq for ParticipantId
Auto Trait Implementations§
impl Freeze for ParticipantId
impl RefUnwindSafe for ParticipantId
impl Send for ParticipantId
impl Sync for ParticipantId
impl Unpin for ParticipantId
impl UnwindSafe for ParticipantId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more