pub struct OperationBuilder<I = (), O = (), E = ()> { /* private fields */ }
Expand description
Builder for Operation
.
Implementations§
Source§impl OperationBuilder<(), (), ()>
impl OperationBuilder<(), (), ()>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new OperationBuilder
.
Source§impl<I, O, E> OperationBuilder<I, O, E>
impl<I, O, E> OperationBuilder<I, O, E>
Sourcepub fn service_name(self, service_name: impl Into<Cow<'static, str>>) -> Self
pub fn service_name(self, service_name: impl Into<Cow<'static, str>>) -> Self
Configures the service name for the builder.
Sourcepub fn operation_name(
self,
operation_name: impl Into<Cow<'static, str>>,
) -> Self
pub fn operation_name( self, operation_name: impl Into<Cow<'static, str>>, ) -> Self
Configures the operation name for the builder.
Sourcepub fn http_client(self, connector: impl HttpClient + 'static) -> Self
pub fn http_client(self, connector: impl HttpClient + 'static) -> Self
Configures the http client for the builder.
Sourcepub fn endpoint_url(self, url: &str) -> Self
pub fn endpoint_url(self, url: &str) -> Self
Configures the endpoint URL for the builder.
Sourcepub fn retry_classifier(
self,
retry_classifier: impl ClassifyRetry + 'static,
) -> Self
pub fn retry_classifier( self, retry_classifier: impl ClassifyRetry + 'static, ) -> Self
Configures the retry classifier for the builder.
Sourcepub fn standard_retry(self, retry_config: &RetryConfig) -> Self
pub fn standard_retry(self, retry_config: &RetryConfig) -> Self
Configures the standard retry for the builder.
Sourcepub fn timeout_config(self, timeout_config: TimeoutConfig) -> Self
pub fn timeout_config(self, timeout_config: TimeoutConfig) -> Self
Configures the timeout configuration for the builder.
Sourcepub fn sleep_impl(self, async_sleep: impl AsyncSleep + 'static) -> Self
pub fn sleep_impl(self, async_sleep: impl AsyncSleep + 'static) -> Self
Configures the sleep for the builder.
Sourcepub fn time_source(self, time_source: impl TimeSource + 'static) -> Self
pub fn time_source(self, time_source: impl TimeSource + 'static) -> Self
Configures the time source for the builder.
Sourcepub fn interceptor(self, interceptor: impl Intercept + 'static) -> Self
pub fn interceptor(self, interceptor: impl Intercept + 'static) -> Self
Configures the interceptor for the builder.
Sourcepub fn with_connection_poisoning(self) -> Self
pub fn with_connection_poisoning(self) -> Self
Registers the ConnectionPoisoningInterceptor
.
Sourcepub fn runtime_plugin(
self,
runtime_plugin: impl RuntimePlugin + 'static,
) -> Self
pub fn runtime_plugin( self, runtime_plugin: impl RuntimePlugin + 'static, ) -> Self
Configures the runtime plugin for the builder.
Sourcepub fn stalled_stream_protection(
self,
stalled_stream_protection: StalledStreamProtectionConfig,
) -> Self
pub fn stalled_stream_protection( self, stalled_stream_protection: StalledStreamProtectionConfig, ) -> Self
Configures stalled stream protection with the given config.
Sourcepub fn serializer<I2>(
self,
serializer: impl Fn(I2) -> Result<HttpRequest, BoxError> + Send + Sync + 'static,
) -> OperationBuilder<I2, O, E>
pub fn serializer<I2>( self, serializer: impl Fn(I2) -> Result<HttpRequest, BoxError> + Send + Sync + 'static, ) -> OperationBuilder<I2, O, E>
Configures the serializer for the builder.
Sourcepub fn deserializer<O2, E2>(
self,
deserializer: impl Fn(&HttpResponse) -> Result<O2, OrchestratorError<E2>> + Send + Sync + 'static,
) -> OperationBuilder<I, O2, E2>
pub fn deserializer<O2, E2>( self, deserializer: impl Fn(&HttpResponse) -> Result<O2, OrchestratorError<E2>> + Send + Sync + 'static, ) -> OperationBuilder<I, O2, E2>
Configures the deserializer for the builder.
Sourcepub fn deserializer_impl<O2, E2>(
self,
deserializer: impl DeserializeResponse + Send + Sync + 'static,
) -> OperationBuilder<I, O2, E2>
pub fn deserializer_impl<O2, E2>( self, deserializer: impl DeserializeResponse + Send + Sync + 'static, ) -> OperationBuilder<I, O2, E2>
Configures the a deserializer implementation for the builder.
Trait Implementations§
Auto Trait Implementations§
impl<I, O, E> Freeze for OperationBuilder<I, O, E>
impl<I = (), O = (), E = ()> !RefUnwindSafe for OperationBuilder<I, O, E>
impl<I, O, E> Send for OperationBuilder<I, O, E>
impl<I, O, E> Sync for OperationBuilder<I, O, E>
impl<I, O, E> Unpin for OperationBuilder<I, O, E>
impl<I = (), O = (), E = ()> !UnwindSafe for OperationBuilder<I, O, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more