gcp_sdk_gax::options

Trait RequestOptionsBuilder

Source
pub trait RequestOptionsBuilder {
    // Required methods
    fn with_user_agent<V: Into<String>>(self, v: V) -> Self;
    fn with_attempt_timeout<V: Into<Duration>>(self, v: V) -> Self;
    fn with_retry_policy<V: Into<RetryPolicyArg>>(self, v: V) -> Self;
}
Expand description

Implementations of this trait provide setters to configure request options.

The Google Cloud Client Libraries for Rust provide a builder for each RPC. These builders can be used to set the request parameters, e.g., the name of the resource targeted by the RPC, as well as any options affecting the request, such as additional headers or timeouts.

Required Methods§

Source

fn with_user_agent<V: Into<String>>(self, v: V) -> Self

Set the user agent header.

Source

fn with_attempt_timeout<V: Into<Duration>>(self, v: V) -> Self

Sets the per-attempt timeout.

When using a retry loop, this affects the timeout for each attempt. The overall timeout for a request is set by the retry policy.

Source

fn with_retry_policy<V: Into<RetryPolicyArg>>(self, v: V) -> Self

Sets the retry policy configuration.

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§

Source§

impl<T> RequestOptionsBuilder for T
where T: RequestBuilder,

Implements the RequestOptionsBuilder trait for any RequestBuilder implementation.