#[non_exhaustive]pub enum TopicCollection {
TopicIds(Vec<Uuid>),
TopicNames(Vec<String>),
}Expand description
A collection of topics. This collection may define topics by name or ID.
Corresponds to org.apache.kafka.common.TopicCollection. Java models this
as an abstract class with TopicIdCollection / TopicNameCollection
subclasses; in Rust the closed set of subclasses is an enum, so callers
match on the variant instead of using instanceof.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TopicIds(Vec<Uuid>)
A collection of topics defined by their topic ID
(TopicCollection.TopicIdCollection).
TopicNames(Vec<String>)
A collection of topics defined by their topic name
(TopicCollection.TopicNameCollection).
Implementations§
Source§impl TopicCollection
impl TopicCollection
Sourcepub fn of_topic_ids(topics: Vec<Uuid>) -> TopicCollection
pub fn of_topic_ids(topics: Vec<Uuid>) -> TopicCollection
Returns a collection of topics defined by topic ID.
Translated from TopicCollection.ofTopicIds.
Sourcepub fn of_topic_names(topics: Vec<String>) -> TopicCollection
pub fn of_topic_names(topics: Vec<String>) -> TopicCollection
Returns a collection of topics defined by topic name.
Translated from TopicCollection.ofTopicNames.
Trait Implementations§
Source§impl Clone for TopicCollection
impl Clone for TopicCollection
Source§fn clone(&self) -> TopicCollection
fn clone(&self) -> TopicCollection
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 TopicCollection
impl Debug for TopicCollection
Source§impl PartialEq for TopicCollection
impl PartialEq for TopicCollection
impl Eq for TopicCollection
impl StructuralPartialEq for TopicCollection
Auto Trait Implementations§
impl Freeze for TopicCollection
impl RefUnwindSafe for TopicCollection
impl Send for TopicCollection
impl Sync for TopicCollection
impl Unpin for TopicCollection
impl UnsafeUnpin for TopicCollection
impl UnwindSafe for TopicCollection
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