pub struct OperationBuilder<I = (), O = (), E = ()> { /* private fields */ }
Available on crate feature client only.
Expand description

Builder for Operation.

Implementations§

source§

impl OperationBuilder<(), (), ()>

source

pub fn new() -> Self

Creates a new OperationBuilder.

source§

impl<I, O, E> OperationBuilder<I, O, E>

source

pub fn service_name(self, service_name: impl Into<Cow<'static, str>>) -> Self

Configures the service name for the builder.

source

pub fn operation_name( self, operation_name: impl Into<Cow<'static, str>> ) -> Self

Configures the operation name for the builder.

source

pub fn http_client(self, connector: impl HttpClient + 'static) -> Self

Configures the http client for the builder.

source

pub fn endpoint_url(self, url: &str) -> Self

Configures the endpoint URL for the builder.

source

pub fn retry_classifier( self, retry_classifier: impl ClassifyRetry + 'static ) -> Self

Configures the retry classifier for the builder.

source

pub fn no_retry(self) -> Self

Disables the retry for the operation.

source

pub fn standard_retry(self, retry_config: &RetryConfig) -> Self

Configures the standard retry for the builder.

source

pub fn timeout_config(self, timeout_config: TimeoutConfig) -> Self

Configures the timeout configuration for the builder.

source

pub fn no_auth(self) -> Self

Disables auth for the operation.

source

pub fn sleep_impl(self, async_sleep: impl AsyncSleep + 'static) -> Self

Configures the sleep for the builder.

source

pub fn time_source(self, time_source: impl TimeSource + 'static) -> Self

Configures the time source for the builder.

source

pub fn interceptor(self, interceptor: impl Intercept + 'static) -> Self

Configures the interceptor for the builder.

source

pub fn with_connection_poisoning(self) -> Self

source

pub fn runtime_plugin( self, runtime_plugin: impl RuntimePlugin + 'static ) -> Self

Configures the runtime plugin for the builder.

source

pub fn serializer<I2>( self, serializer: impl Fn(I2) -> Result<HttpRequest, BoxError> + Send + Sync + 'static ) -> OperationBuilder<I2, O, E>
where I2: Debug + Send + Sync + 'static,

Configures the serializer for the builder.

source

pub fn deserializer<O2, E2>( self, deserializer: impl Fn(&HttpResponse) -> Result<O2, OrchestratorError<E2>> + Send + Sync + 'static ) -> OperationBuilder<I, O2, E2>
where O2: Debug + Send + Sync + 'static, E2: Error + Debug + Send + Sync + 'static,

Configures the deserializer for the builder.

source

pub fn build(self) -> Operation<I, O, E>

Creates an Operation from the builder.

Trait Implementations§

source§

impl<I: Debug, O: Debug, E: Debug> Debug for OperationBuilder<I, O, E>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for OperationBuilder<(), (), ()>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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>
where E: Send, I: Send, O: Send,

§

impl<I, O, E> Sync for OperationBuilder<I, O, E>
where E: Sync, I: Sync, O: Sync,

§

impl<I, O, E> Unpin for OperationBuilder<I, O, E>
where E: Unpin, I: Unpin, O: Unpin,

§

impl<I = (), O = (), E = ()> !UnwindSafe for OperationBuilder<I, O, E>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more