pub struct NodeId(pub u64);Expand description
A broker, node, replica, or controller identifier.
Krabka carries this value as a u64 internally: the consensus peer id, the
KIP-853 voter id, and the partition replica, leader, and ISR ids. On the
Kafka wire the same value is an int32: broker.id, node.id, and the
replica ids. The protocol boundary converts between the two. The value is an
identifier, not a quantity, so this crate supplies no arithmetic.
Tuple Fields§
§0: u64Implementations§
Trait Implementations§
impl Copy for NodeId
Source§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NodeId
Source§impl Ord for NodeId
impl Ord for NodeId
1.21.0 (const: unstable) · 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 PartialOrd for NodeId
impl PartialOrd for NodeId
Source§impl PartialOrd<NodeId> for u64
impl PartialOrd<NodeId> for u64
Source§impl PartialOrd<u64> for NodeId
impl PartialOrd<u64> for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnsafeUnpin for NodeId
impl UnwindSafe for NodeId
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