Struct NodeId
pub struct NodeId(pub u64);Expand description
A broker or controller node id: the canonical krabka_ids::NodeId
newtype, which is a u64 internally and Kafka’s int32 on the wire.
This crate re-exports the type, so the consensus stack keeps the name
krabka_voters::NodeId.
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
§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NodeId
§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
§impl PartialOrd for NodeId
impl PartialOrd for NodeId
§impl PartialOrd<u64> for NodeId
impl PartialOrd<u64> for NodeId
§impl Serialize for NodeId
impl Serialize for NodeId
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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