pub struct PartitionIndex(pub i32);Expand description
A partition index within a topic. KIP wire type: int32.
The type is ordered and hashable, so it keys the per-partition maps in the broker and replication paths. A partition index is an identifier, not a quantity, so this crate implements no arithmetic.
Tuple Fields§
§0: i32Implementations§
Trait Implementations§
Source§impl Clone for PartitionIndex
impl Clone for PartitionIndex
Source§fn clone(&self) -> PartitionIndex
fn clone(&self) -> PartitionIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PartitionIndex
Source§impl Debug for PartitionIndex
impl Debug for PartitionIndex
Source§impl Default for PartitionIndex
impl Default for PartitionIndex
Source§fn default() -> PartitionIndex
fn default() -> PartitionIndex
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PartitionIndex
impl<'de> Deserialize<'de> for PartitionIndex
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
Source§impl Display for PartitionIndex
impl Display for PartitionIndex
impl Eq for PartitionIndex
Source§impl From<PartitionIndex> for i32
impl From<PartitionIndex> for i32
Source§fn from(value: PartitionIndex) -> Self
fn from(value: PartitionIndex) -> Self
Converts to this type from the input type.
Source§impl From<i32> for PartitionIndex
impl From<i32> for PartitionIndex
Source§impl Hash for PartitionIndex
impl Hash for PartitionIndex
Source§impl Ord for PartitionIndex
impl Ord for PartitionIndex
Source§fn cmp(&self, other: &PartitionIndex) -> Ordering
fn cmp(&self, other: &PartitionIndex) -> Ordering
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 PartialEq for PartitionIndex
impl PartialEq for PartitionIndex
Source§fn eq(&self, other: &PartitionIndex) -> bool
fn eq(&self, other: &PartitionIndex) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<PartitionIndex> for i32
impl PartialEq<PartitionIndex> for i32
Source§fn eq(&self, other: &PartitionIndex) -> bool
fn eq(&self, other: &PartitionIndex) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<i32> for PartitionIndex
impl PartialEq<i32> for PartitionIndex
Source§impl PartialOrd for PartitionIndex
impl PartialOrd for PartitionIndex
Source§impl PartialOrd<PartitionIndex> for i32
impl PartialOrd<PartitionIndex> for i32
Source§impl PartialOrd<i32> for PartitionIndex
impl PartialOrd<i32> for PartitionIndex
Source§impl Serialize for PartitionIndex
impl Serialize for PartitionIndex
impl StructuralPartialEq for PartitionIndex
Auto Trait Implementations§
impl Freeze for PartitionIndex
impl RefUnwindSafe for PartitionIndex
impl Send for PartitionIndex
impl Sync for PartitionIndex
impl Unpin for PartitionIndex
impl UnsafeUnpin for PartitionIndex
impl UnwindSafe for PartitionIndex
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