[][src]Struct gcp_client::google::pubsub::v1beta2::subscriber_client::SubscriberClient

pub struct SubscriberClient<T> { /* fields omitted */ }

The service that an application uses to manipulate subscriptions and to consume messages from a subscription via the Pull method.

Implementations

impl<T> SubscriberClient<T> where
    T: GrpcService<BoxBody>,
    T::ResponseBody: Body + HttpBody + Send + 'static,
    T::Error: Into<StdError>,
    <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send
[src]

pub fn new(inner: T) -> Self[src]

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self[src]

pub async fn create_subscription<'_>(
    &'_ mut self,
    request: impl IntoRequest<Subscription>
) -> Result<Response<Subscription>, Status>
[src]

Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND.

If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.

pub async fn get_subscription<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetSubscriptionRequest>
) -> Result<Response<Subscription>, Status>
[src]

Gets the configuration details of a subscription.

pub async fn list_subscriptions<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListSubscriptionsRequest>
) -> Result<Response<ListSubscriptionsResponse>, Status>
[src]

Lists matching subscriptions.

pub async fn delete_subscription<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteSubscriptionRequest>
) -> Result<Response<()>, Status>
[src]

Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.

pub async fn modify_ack_deadline<'_>(
    &'_ mut self,
    request: impl IntoRequest<ModifyAckDeadlineRequest>
) -> Result<Response<()>, Status>
[src]

Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

pub async fn acknowledge<'_>(
    &'_ mut self,
    request: impl IntoRequest<AcknowledgeRequest>
) -> Result<Response<()>, Status>
[src]

Acknowledges the messages associated with the ack tokens in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription.

Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.

pub async fn pull<'_>(
    &'_ mut self,
    request: impl IntoRequest<PullRequest>
) -> Result<Response<PullResponse>, Status>
[src]

Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.

pub async fn modify_push_config<'_>(
    &'_ mut self,
    request: impl IntoRequest<ModifyPushConfigRequest>
) -> Result<Response<()>, Status>
[src]

Modifies the PushConfig for a specified subscription.

This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the PushConfig.

Trait Implementations

impl<T: Clone> Clone for SubscriberClient<T>[src]

impl<T> Debug for SubscriberClient<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for SubscriberClient<T>

impl<T> Send for SubscriberClient<T> where
    T: Send

impl<T> Sync for SubscriberClient<T> where
    T: Sync

impl<T> Unpin for SubscriberClient<T> where
    T: Unpin

impl<T> !UnwindSafe for SubscriberClient<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]