pub struct CreateTopicsResult { /* private fields */ }Expand description
The result of Admin::create_topics.
Implementations§
Source§impl CreateTopicsResult
impl CreateTopicsResult
Sourcepub fn values(&self) -> HashMap<String, KafkaFuture<()>>
pub fn values(&self) -> HashMap<String, KafkaFuture<()>>
Returns a map from topic names to futures, which can be used to check the status of individual topic creations.
Sourcepub fn all(&self) -> KafkaFuture<()>
pub fn all(&self) -> KafkaFuture<()>
Returns a future which succeeds if all the topic creations succeed.
Sourcepub fn config(&self, topic: &str) -> KafkaFuture<Config>
pub fn config(&self, topic: &str) -> KafkaFuture<Config>
Returns a future that provides topic configs for the topic when the request completes.
If broker version doesn’t support replication factor in the response, the future
completes with an error answering Error::is_unsupported_version_error. If broker
returned an error for topic configs, it completes with the appropriate error, for
example one answering Error::is_topic_authorization_error if user does not have
permission to describe topic configs. Note that the values for the type and documentation
fields will be None.
§Arguments
topic- the topic name.
§Panics
Panics with Topic <topic> was not part of the createTopics request if
topic was not part of the original request, where Java’s
futures.get(topic) is null and the call throws
NullPointerException. Asking for a
topic the caller did not request is a programming error the caller can
rule out, so the accessor keeps its plain KafkaFuture signature;
read the requested topics from
values to avoid it.
Sourcepub fn topic_id(&self, topic: &str) -> KafkaFuture<Uuid>
pub fn topic_id(&self, topic: &str) -> KafkaFuture<Uuid>
Returns a future that provides the topic id for the topic when the request completes.
If broker version doesn’t support replication factor in the response, the future
completes with an error answering Error::is_unsupported_version_error. If broker
returned an error for topic configs, it completes with the appropriate error, for
example one answering Error::is_topic_authorization_error if user does not have
permission to describe topic configs.
§Arguments
topic- the topic name.
§Panics
Panics with Topic <topic> was not part of the createTopics request if
topic was not part of the original request, where Java’s
futures.get(topic) is null and the call throws
NullPointerException. Asking for a
topic the caller did not request is a programming error the caller can
rule out, so the accessor keeps its plain KafkaFuture signature;
read the requested topics from
values to avoid it.
Sourcepub fn num_partitions(&self, topic: &str) -> KafkaFuture<i32>
pub fn num_partitions(&self, topic: &str) -> KafkaFuture<i32>
Returns a future that provides the number of partitions for the topic when the request completes.
If broker version doesn’t support replication factor in the response, the future
completes with an error answering Error::is_unsupported_version_error. If broker
returned an error for topic configs, it completes with the appropriate error, for
example one answering Error::is_topic_authorization_error if user does not have
permission to describe topic configs.
§Arguments
topic- the topic name.
§Panics
Panics with Topic <topic> was not part of the createTopics request if
topic was not part of the original request, where Java’s
futures.get(topic) is null and the call throws
NullPointerException. Asking for a
topic the caller did not request is a programming error the caller can
rule out, so the accessor keeps its plain KafkaFuture signature;
read the requested topics from
values to avoid it.
Sourcepub fn replication_factor(&self, topic: &str) -> KafkaFuture<i32>
pub fn replication_factor(&self, topic: &str) -> KafkaFuture<i32>
Returns a future that provides the replication factor for the topic when the request completes.
If broker version doesn’t support replication factor in the response, the future
completes with an error answering Error::is_unsupported_version_error. If broker
returned an error for topic configs, it completes with the appropriate error, for
example one answering Error::is_topic_authorization_error if user does not have
permission to describe topic configs.
§Arguments
topic- the topic name.
§Panics
Panics with Topic <topic> was not part of the createTopics request if
topic was not part of the original request, where Java’s
futures.get(topic) is null and the call throws
NullPointerException. Asking for a
topic the caller did not request is a programming error the caller can
rule out, so the accessor keeps its plain KafkaFuture signature;
read the requested topics from
values to avoid it.
Trait Implementations§
Source§impl Clone for CreateTopicsResult
impl Clone for CreateTopicsResult
Source§fn clone(&self) -> CreateTopicsResult
fn clone(&self) -> CreateTopicsResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more