pub struct TopicIdPartition { /* private fields */ }Expand description
A universally unique identifier paired with a TopicPartition.
Corresponds to Java’s org.apache.kafka.common.TopicIdPartition.
Implementations§
Source§impl TopicIdPartition
impl TopicIdPartition
Sourcepub fn new(topic_id: Uuid, topic_partition: TopicPartition) -> Self
pub fn new(topic_id: Uuid, topic_partition: TopicPartition) -> Self
Creates an instance with the provided topic ID and topic partition.
Translates Java’s TopicIdPartition(Uuid topicId, TopicPartition topicPartition).
Sourcepub fn with_partition_topic(
topic_id: Uuid,
partition: i32,
topic: impl Into<String>,
) -> Self
pub fn with_partition_topic( topic_id: Uuid, partition: i32, topic: impl Into<String>, ) -> Self
Creates an instance from a topic ID, partition number, and topic name.
Translates Java’s TopicIdPartition(Uuid topicId, int partition, String topic).
Sourcepub fn topic_id(&self) -> Uuid
pub fn topic_id(&self) -> Uuid
Returns the universally unique id representing this topic partition.
Sourcepub fn topic_partition(&self) -> &TopicPartition
pub fn topic_partition(&self) -> &TopicPartition
Returns the underlying topic partition.
Trait Implementations§
Source§impl Clone for TopicIdPartition
impl Clone for TopicIdPartition
Source§fn clone(&self) -> TopicIdPartition
fn clone(&self) -> TopicIdPartition
Returns a duplicate 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 TopicIdPartition
impl Debug for TopicIdPartition
Source§impl Display for TopicIdPartition
impl Display for TopicIdPartition
Source§impl Hash for TopicIdPartition
impl Hash for TopicIdPartition
Source§impl PartialEq for TopicIdPartition
impl PartialEq for TopicIdPartition
impl Eq for TopicIdPartition
Auto Trait Implementations§
impl Freeze for TopicIdPartition
impl RefUnwindSafe for TopicIdPartition
impl Send for TopicIdPartition
impl Sync for TopicIdPartition
impl Unpin for TopicIdPartition
impl UnsafeUnpin for TopicIdPartition
impl UnwindSafe for TopicIdPartition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more