Struct nakadion::api::Builder [−][src]
#[non_exhaustive]pub struct Builder {
pub nakadi_base_url: Option<NakadiBaseUrl>,
pub timeout_millis: Option<ApiClientTimeoutMillis>,
pub attempt_timeout_millis: Option<ApiClientAttemptTimeoutMillis>,
pub initial_retry_interval_millis: Option<ApiClientInitialRetryIntervalMillis>,
pub retry_interval_multiplier: Option<ApiClientRetryIntervalMultiplier>,
pub max_retry_interval_millis: Option<ApiClientMaxRetryIntervalMillis>,
pub retry_on_auth_errors: Option<ApiClientRetryOnAuthErrors>,
}
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.nakadi_base_url: Option<NakadiBaseUrl>
timeout_millis: Option<ApiClientTimeoutMillis>
Timeout for a complete publishing including potential retries
attempt_timeout_millis: Option<ApiClientAttemptTimeoutMillis>
Timeout for a single request attempt to Nakadi
initial_retry_interval_millis: Option<ApiClientInitialRetryIntervalMillis>
Interval length before the first retry attempt
retry_interval_multiplier: Option<ApiClientRetryIntervalMultiplier>
Multiplier for the length of of the next retry interval
max_retry_interval_millis: Option<ApiClientMaxRetryIntervalMillis>
Maximum length of an interval before a retry
retry_on_auth_errors: Option<ApiClientRetryOnAuthErrors>
Retry on authentication/authorization errors if true
Implementations
Initializes all fields from environment variables prefixed with “NAKADION_”
Initializes all fields from environment variables prefixed with “[prefix]_”
The underscore is omitted if prefix
is empty
Initializes all fields from environment variables without any prefix
Updates all not yet set fields from environment variables prefixed with “NAKADION_”
Updates all not yet set fields from environment variables prefixed with “[prefix]_”
The underscore is omitted if prefix
is empty
Updates all not yet set fields from environment variables without any prefix
Timeout for a complete request including potential retries
Timeout for a single attempt to get a response from Nakadi
pub fn initial_retry_interval_millis<T: Into<ApiClientInitialRetryIntervalMillis>>(
self,
v: T
) -> Self
pub fn initial_retry_interval_millis<T: Into<ApiClientInitialRetryIntervalMillis>>(
self,
v: T
) -> Self
Interval length before the first retry attempt
pub fn retry_interval_multiplier<T: Into<ApiClientRetryIntervalMultiplier>>(
self,
v: T
) -> Self
pub fn retry_interval_multiplier<T: Into<ApiClientRetryIntervalMultiplier>>(
self,
v: T
) -> Self
Multiplier for the length of of the next retry interval
pub fn max_retry_interval_millis<T: Into<ApiClientMaxRetryIntervalMillis>>(
self,
v: T
) -> Self
pub fn max_retry_interval_millis<T: Into<ApiClientMaxRetryIntervalMillis>>(
self,
v: T
) -> Self
Maximum length of an interval before a retry
Retry on authentication/authorization errors if true
pub fn build_with<D, P>(
self,
dispatch_http_request: D,
access_token_provider: P
) -> Result<ApiClient, Error> where
D: DispatchHttpRequest + Send + Sync + 'static,
P: ProvidesAccessToken + Send + Sync + 'static,
pub fn build_with<D, P>(
self,
dispatch_http_request: D,
access_token_provider: P
) -> Result<ApiClient, Error> where
D: DispatchHttpRequest + Send + Sync + 'static,
P: ProvidesAccessToken + Send + Sync + 'static,
Build an ApiClient
from this Builder
No environment variables are read
pub fn build_from_env_with_dispatcher<D>(
self,
dispatch_http_request: D
) -> Result<ApiClient, Error> where
D: DispatchHttpRequest + Send + Sync + 'static,
pub fn build_from_env_with_dispatcher<D>(
self,
dispatch_http_request: D
) -> Result<ApiClient, Error> where
D: DispatchHttpRequest + Send + Sync + 'static,
Build an ApiClient
from this Builder
Unset fields of this Builder
will be set from the environment
including the settings for the ProvidesAccessToken
Environment variables must be prefixed with NAKADION
pub fn build_from_env_prefixed_with_dispatcher<T, D>(
self,
prefix: T,
dispatch_http_request: D
) -> Result<ApiClient, Error> where
T: AsRef<str>,
D: DispatchHttpRequest + Send + Sync + 'static,
pub fn build_from_env_prefixed_with_dispatcher<T, D>(
self,
prefix: T,
dispatch_http_request: D
) -> Result<ApiClient, Error> where
T: AsRef<str>,
D: DispatchHttpRequest + Send + Sync + 'static,
Build an ApiClient
from this Builder
Unset fields of this Builder
will be set from the environment
including the settings for the ProvidesAccessToken
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl UnwindSafe for Builder
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more