Skip to main content

TopicAdmin

Trait TopicAdmin 

Source
pub trait TopicAdmin:
    Debug
    + Send
    + Sync {
    // Provided methods
    fn create_topic(
        &self,
        _req: Topic,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Topic>>> + Send { ... }
    fn update_topic(
        &self,
        _req: UpdateTopicRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Topic>>> + Send { ... }
    fn get_topic(
        &self,
        _req: GetTopicRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Topic>>> + Send { ... }
    fn list_topics(
        &self,
        _req: ListTopicsRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<ListTopicsResponse>>> + Send { ... }
    fn list_topic_subscriptions(
        &self,
        _req: ListTopicSubscriptionsRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<ListTopicSubscriptionsResponse>>> + Send { ... }
    fn list_topic_snapshots(
        &self,
        _req: ListTopicSnapshotsRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<ListTopicSnapshotsResponse>>> + Send { ... }
    fn delete_topic(
        &self,
        _req: DeleteTopicRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<()>>> + Send { ... }
    fn detach_subscription(
        &self,
        _req: DetachSubscriptionRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<DetachSubscriptionResponse>>> + Send { ... }
}
Expand description

Defines the trait used to implement super::client::TopicAdmin.

Application developers may need to implement this trait to mock client::TopicAdmin. In other use-cases, application developers only use client::TopicAdmin and need not be concerned with this trait or its implementations.

Services gain new RPCs routinely. Consequently, this trait gains new methods too. To avoid breaking applications the trait provides a default implementation of each method. Most of these implementations just return an error.

Provided Methods§

Source

fn create_topic( &self, _req: Topic, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Topic>>> + Send

Source

fn update_topic( &self, _req: UpdateTopicRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Topic>>> + Send

Source

fn get_topic( &self, _req: GetTopicRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Topic>>> + Send

Source

fn list_topics( &self, _req: ListTopicsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListTopicsResponse>>> + Send

Source

fn list_topic_subscriptions( &self, _req: ListTopicSubscriptionsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListTopicSubscriptionsResponse>>> + Send

Source

fn list_topic_snapshots( &self, _req: ListTopicSnapshotsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListTopicSnapshotsResponse>>> + Send

Source

fn delete_topic( &self, _req: DeleteTopicRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send

Source

fn detach_subscription( &self, _req: DetachSubscriptionRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<DetachSubscriptionResponse>>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§