Skip to main content

WorkerConfigBuilder

Struct WorkerConfigBuilder 

Source
pub struct WorkerConfigBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build_internal().

Implementations§

Source§

impl<S: State> WorkerConfigBuilder<S>

Source

pub fn namespace( self, value: impl Into<String>, ) -> WorkerConfigBuilder<SetNamespace<S>>
where S::Namespace: IsUnset,

Required.

The Temporal service namespace this worker is bound to

Source

pub fn task_queue( self, value: impl Into<String>, ) -> WorkerConfigBuilder<SetTaskQueue<S>>
where S::TaskQueue: IsUnset,

Required.

What task queue will this worker poll from? This task queue name will be used for both workflow and activity polling.

Source

pub fn client_identity_override( self, value: impl Into<String>, ) -> WorkerConfigBuilder<SetClientIdentityOverride<S>>
where S::ClientIdentityOverride: IsUnset,

Optional (Some / Option setters).

A human-readable string that can identify this worker. Using something like sdk version and host name is a good default. If set, overrides the identity set (if any) on the client used by this worker.

Source

pub fn maybe_client_identity_override( self, value: Option<impl Into<String>>, ) -> WorkerConfigBuilder<SetClientIdentityOverride<S>>
where S::ClientIdentityOverride: IsUnset,

Optional (Some / Option setters).

A human-readable string that can identify this worker. Using something like sdk version and host name is a good default. If set, overrides the identity set (if any) on the client used by this worker.

Source

pub fn max_cached_workflows( self, value: usize, ) -> WorkerConfigBuilder<SetMaxCachedWorkflows<S>>
where S::MaxCachedWorkflows: IsUnset,

Optional (Some / Option setters). Default: 0.

If set nonzero, workflows will be cached and sticky task queues will be used, meaning that history updates are applied incrementally to suspended instances of workflow execution. Workflows are evicted according to a least-recently-used policy once the cache maximum is reached. Workflows may also be explicitly evicted at any time, or as a result of errors or failures.

Source

pub fn maybe_max_cached_workflows( self, value: Option<usize>, ) -> WorkerConfigBuilder<SetMaxCachedWorkflows<S>>
where S::MaxCachedWorkflows: IsUnset,

Optional (Some / Option setters). Default: 0.

If set nonzero, workflows will be cached and sticky task queues will be used, meaning that history updates are applied incrementally to suspended instances of workflow execution. Workflows are evicted according to a least-recently-used policy once the cache maximum is reached. Workflows may also be explicitly evicted at any time, or as a result of errors or failures.

Source

pub fn tuner( self, value: Arc<dyn WorkerTuner + Send + Sync>, ) -> WorkerConfigBuilder<SetTuner<S>>
where S::Tuner: IsUnset,

Optional (Some / Option setters).

Set a crate::WorkerTuner for this worker. Either this or at least one of the max_outstanding_* fields must be set.

Source

pub fn maybe_tuner( self, value: Option<Arc<dyn WorkerTuner + Send + Sync>>, ) -> WorkerConfigBuilder<SetTuner<S>>
where S::Tuner: IsUnset,

Optional (Some / Option setters).

Set a crate::WorkerTuner for this worker. Either this or at least one of the max_outstanding_* fields must be set.

Source

pub fn workflow_task_poller_behavior( self, value: PollerBehavior, ) -> WorkerConfigBuilder<SetWorkflowTaskPollerBehavior<S>>
where S::WorkflowTaskPollerBehavior: IsUnset,

Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).

Maximum number of concurrent poll workflow task requests we will perform at a time on this worker’s task queue. See also WorkerConfig::nonsticky_to_sticky_poll_ratio. If using SimpleMaximum, Must be at least 2 when max_cached_workflows > 0, or is an error.

Source

pub fn maybe_workflow_task_poller_behavior( self, value: Option<PollerBehavior>, ) -> WorkerConfigBuilder<SetWorkflowTaskPollerBehavior<S>>
where S::WorkflowTaskPollerBehavior: IsUnset,

Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).

Maximum number of concurrent poll workflow task requests we will perform at a time on this worker’s task queue. See also WorkerConfig::nonsticky_to_sticky_poll_ratio. If using SimpleMaximum, Must be at least 2 when max_cached_workflows > 0, or is an error.

Source

pub fn nonsticky_to_sticky_poll_ratio( self, value: f32, ) -> WorkerConfigBuilder<SetNonstickyToStickyPollRatio<S>>
where S::NonstickyToStickyPollRatio: IsUnset,

Optional (Some / Option setters). Default: 0.2.

Only applies when using PollerBehavior::SimpleMaximum

(max workflow task polls * this number) = the number of max pollers that will be allowed for the nonsticky queue when sticky tasks are enabled. If both defaults are used, the sticky queue will allow 4 max pollers while the nonsticky queue will allow one. The minimum for either poller is 1, so if the maximum allowed is 1 and sticky queues are enabled, there will be 2 concurrent polls.

Source

pub fn maybe_nonsticky_to_sticky_poll_ratio( self, value: Option<f32>, ) -> WorkerConfigBuilder<SetNonstickyToStickyPollRatio<S>>
where S::NonstickyToStickyPollRatio: IsUnset,

Optional (Some / Option setters). Default: 0.2.

Only applies when using PollerBehavior::SimpleMaximum

(max workflow task polls * this number) = the number of max pollers that will be allowed for the nonsticky queue when sticky tasks are enabled. If both defaults are used, the sticky queue will allow 4 max pollers while the nonsticky queue will allow one. The minimum for either poller is 1, so if the maximum allowed is 1 and sticky queues are enabled, there will be 2 concurrent polls.

Source

pub fn activity_task_poller_behavior( self, value: PollerBehavior, ) -> WorkerConfigBuilder<SetActivityTaskPollerBehavior<S>>
where S::ActivityTaskPollerBehavior: IsUnset,

Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).

Maximum number of concurrent poll activity task requests we will perform at a time on this worker’s task queue

Source

pub fn maybe_activity_task_poller_behavior( self, value: Option<PollerBehavior>, ) -> WorkerConfigBuilder<SetActivityTaskPollerBehavior<S>>
where S::ActivityTaskPollerBehavior: IsUnset,

Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).

Maximum number of concurrent poll activity task requests we will perform at a time on this worker’s task queue

Source

pub fn nexus_task_poller_behavior( self, value: PollerBehavior, ) -> WorkerConfigBuilder<SetNexusTaskPollerBehavior<S>>
where S::NexusTaskPollerBehavior: IsUnset,

Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).

Maximum number of concurrent poll nexus task requests we will perform at a time on this worker’s task queue

Source

pub fn maybe_nexus_task_poller_behavior( self, value: Option<PollerBehavior>, ) -> WorkerConfigBuilder<SetNexusTaskPollerBehavior<S>>
where S::NexusTaskPollerBehavior: IsUnset,

Optional (Some / Option setters). Default: PollerBehavior::SimpleMaximum(5).

Maximum number of concurrent poll nexus task requests we will perform at a time on this worker’s task queue

Source

pub fn task_types( self, value: WorkerTaskTypes, ) -> WorkerConfigBuilder<SetTaskTypes<S>>
where S::TaskTypes: IsUnset,

Required.

Specifies which task types this worker will poll for.

Note: At least one task type must be specified or the worker will fail validation.

Source

pub fn sticky_queue_schedule_to_start_timeout( self, value: Duration, ) -> WorkerConfigBuilder<SetStickyQueueScheduleToStartTimeout<S>>
where S::StickyQueueScheduleToStartTimeout: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(10).

How long a workflow task is allowed to sit on the sticky queue before it is timed out and moved to the non-sticky queue where it may be picked up by any worker.

Source

pub fn maybe_sticky_queue_schedule_to_start_timeout( self, value: Option<Duration>, ) -> WorkerConfigBuilder<SetStickyQueueScheduleToStartTimeout<S>>
where S::StickyQueueScheduleToStartTimeout: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(10).

How long a workflow task is allowed to sit on the sticky queue before it is timed out and moved to the non-sticky queue where it may be picked up by any worker.

Source

pub fn max_heartbeat_throttle_interval( self, value: Duration, ) -> WorkerConfigBuilder<SetMaxHeartbeatThrottleInterval<S>>
where S::MaxHeartbeatThrottleInterval: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(60).

Longest interval for throttling activity heartbeats

Source

pub fn maybe_max_heartbeat_throttle_interval( self, value: Option<Duration>, ) -> WorkerConfigBuilder<SetMaxHeartbeatThrottleInterval<S>>
where S::MaxHeartbeatThrottleInterval: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(60).

Longest interval for throttling activity heartbeats

Source

pub fn default_heartbeat_throttle_interval( self, value: Duration, ) -> WorkerConfigBuilder<SetDefaultHeartbeatThrottleInterval<S>>
where S::DefaultHeartbeatThrottleInterval: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(30).

Default interval for throttling activity heartbeats in case ActivityOptions.heartbeat_timeout is unset. When the timeout is set in the ActivityOptions, throttling is set to heartbeat_timeout * 0.8.

Source

pub fn maybe_default_heartbeat_throttle_interval( self, value: Option<Duration>, ) -> WorkerConfigBuilder<SetDefaultHeartbeatThrottleInterval<S>>
where S::DefaultHeartbeatThrottleInterval: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(30).

Default interval for throttling activity heartbeats in case ActivityOptions.heartbeat_timeout is unset. When the timeout is set in the ActivityOptions, throttling is set to heartbeat_timeout * 0.8.

Source

pub fn max_task_queue_activities_per_second( self, value: f64, ) -> WorkerConfigBuilder<SetMaxTaskQueueActivitiesPerSecond<S>>
where S::MaxTaskQueueActivitiesPerSecond: IsUnset,

Optional (Some / Option setters).

Sets the maximum number of activities per second the task queue will dispatch, controlled server-side. Note that this only takes effect upon an activity poll request. If multiple workers on the same queue have different values set, they will thrash with the last poller winning.

Setting this to a nonzero value will also disable eager activity execution.

Source

pub fn maybe_max_task_queue_activities_per_second( self, value: Option<f64>, ) -> WorkerConfigBuilder<SetMaxTaskQueueActivitiesPerSecond<S>>
where S::MaxTaskQueueActivitiesPerSecond: IsUnset,

Optional (Some / Option setters).

Sets the maximum number of activities per second the task queue will dispatch, controlled server-side. Note that this only takes effect upon an activity poll request. If multiple workers on the same queue have different values set, they will thrash with the last poller winning.

Setting this to a nonzero value will also disable eager activity execution.

Source

pub fn max_worker_activities_per_second( self, value: f64, ) -> WorkerConfigBuilder<SetMaxWorkerActivitiesPerSecond<S>>
where S::MaxWorkerActivitiesPerSecond: IsUnset,

Optional (Some / Option setters).

Limits the number of activities per second that this worker will process. The worker will not poll for new activities if by doing so it might receive and execute an activity which would cause it to exceed this limit. Negative, zero, or NaN values will cause building the options to fail.

Source

pub fn maybe_max_worker_activities_per_second( self, value: Option<f64>, ) -> WorkerConfigBuilder<SetMaxWorkerActivitiesPerSecond<S>>
where S::MaxWorkerActivitiesPerSecond: IsUnset,

Optional (Some / Option setters).

Limits the number of activities per second that this worker will process. The worker will not poll for new activities if by doing so it might receive and execute an activity which would cause it to exceed this limit. Negative, zero, or NaN values will cause building the options to fail.

Source

pub fn ignore_evicts_on_shutdown( self, value: bool, ) -> WorkerConfigBuilder<SetIgnoreEvictsOnShutdown<S>>
where S::IgnoreEvictsOnShutdown: IsUnset,

Optional (Some / Option setters). Default: false.

If set false (default), shutdown will not finish until all pending evictions have been issued and replied to. If set true shutdown will be considered complete when the only remaining work is pending evictions.

This flag is useful during tests to avoid needing to deal with lots of uninteresting evictions during shutdown. Alternatively, if a lang implementation finds it easy to clean up during shutdown, setting this true saves some back-and-forth.

Source

pub fn maybe_ignore_evicts_on_shutdown( self, value: Option<bool>, ) -> WorkerConfigBuilder<SetIgnoreEvictsOnShutdown<S>>
where S::IgnoreEvictsOnShutdown: IsUnset,

Optional (Some / Option setters). Default: false.

If set false (default), shutdown will not finish until all pending evictions have been issued and replied to. If set true shutdown will be considered complete when the only remaining work is pending evictions.

This flag is useful during tests to avoid needing to deal with lots of uninteresting evictions during shutdown. Alternatively, if a lang implementation finds it easy to clean up during shutdown, setting this true saves some back-and-forth.

Source

pub fn fetching_concurrency( self, value: usize, ) -> WorkerConfigBuilder<SetFetchingConcurrency<S>>
where S::FetchingConcurrency: IsUnset,

Optional (Some / Option setters). Default: 5.

Maximum number of next page (or initial) history event listing requests we’ll make concurrently. I don’t this it’s worth exposing this to users until we encounter a reason.

Source

pub fn maybe_fetching_concurrency( self, value: Option<usize>, ) -> WorkerConfigBuilder<SetFetchingConcurrency<S>>
where S::FetchingConcurrency: IsUnset,

Optional (Some / Option setters). Default: 5.

Maximum number of next page (or initial) history event listing requests we’ll make concurrently. I don’t this it’s worth exposing this to users until we encounter a reason.

Source

pub fn graceful_shutdown_period( self, value: Duration, ) -> WorkerConfigBuilder<SetGracefulShutdownPeriod<S>>
where S::GracefulShutdownPeriod: IsUnset,

Optional (Some / Option setters).

If set, core will issue cancels for all outstanding activities and nexus operations after shutdown has been initiated and this amount of time has elapsed.

Source

pub fn maybe_graceful_shutdown_period( self, value: Option<Duration>, ) -> WorkerConfigBuilder<SetGracefulShutdownPeriod<S>>
where S::GracefulShutdownPeriod: IsUnset,

Optional (Some / Option setters).

If set, core will issue cancels for all outstanding activities and nexus operations after shutdown has been initiated and this amount of time has elapsed.

Source

pub fn local_timeout_buffer_for_activities( self, value: Duration, ) -> WorkerConfigBuilder<SetLocalTimeoutBufferForActivities<S>>
where S::LocalTimeoutBufferForActivities: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(5).

The amount of time core will wait before timing out activities using its own local timers after one of them elapses. This is to avoid racing with server’s own tracking of the timeout.

Source

pub fn maybe_local_timeout_buffer_for_activities( self, value: Option<Duration>, ) -> WorkerConfigBuilder<SetLocalTimeoutBufferForActivities<S>>
where S::LocalTimeoutBufferForActivities: IsUnset,

Optional (Some / Option setters). Default: Duration::from_secs(5).

The amount of time core will wait before timing out activities using its own local timers after one of them elapses. This is to avoid racing with server’s own tracking of the timeout.

Source

pub fn workflow_failure_errors( self, value: HashSet<WorkflowErrorType>, ) -> WorkerConfigBuilder<SetWorkflowFailureErrors<S>>
where S::WorkflowFailureErrors: IsUnset,

Optional (Some / Option setters). Default: <HashSet<WorkflowErrorType> as Default>::default().

Any error types listed here will cause any workflow being processed by this worker to fail, rather than simply failing the workflow task.

Source

pub fn maybe_workflow_failure_errors( self, value: Option<HashSet<WorkflowErrorType>>, ) -> WorkerConfigBuilder<SetWorkflowFailureErrors<S>>
where S::WorkflowFailureErrors: IsUnset,

Optional (Some / Option setters). Default: <HashSet<WorkflowErrorType> as Default>::default().

Any error types listed here will cause any workflow being processed by this worker to fail, rather than simply failing the workflow task.

Source

pub fn workflow_types_to_failure_errors( self, value: HashMap<String, HashSet<WorkflowErrorType>>, ) -> WorkerConfigBuilder<SetWorkflowTypesToFailureErrors<S>>
where S::WorkflowTypesToFailureErrors: IsUnset,

Optional (Some / Option setters). Default: <HashMap<String, HashSet<WorkflowErrorType>> as Default>::default().

Like WorkerConfig::workflow_failure_errors, but specific to certain workflow types (the map key).

Source

pub fn maybe_workflow_types_to_failure_errors( self, value: Option<HashMap<String, HashSet<WorkflowErrorType>>>, ) -> WorkerConfigBuilder<SetWorkflowTypesToFailureErrors<S>>
where S::WorkflowTypesToFailureErrors: IsUnset,

Optional (Some / Option setters). Default: <HashMap<String, HashSet<WorkflowErrorType>> as Default>::default().

Like WorkerConfig::workflow_failure_errors, but specific to certain workflow types (the map key).

Source

pub fn max_outstanding_workflow_tasks( self, value: impl Into<usize>, ) -> WorkerConfigBuilder<SetMaxOutstandingWorkflowTasks<S>>
where S::MaxOutstandingWorkflowTasks: IsUnset,

Optional (Some / Option setters).

The maximum allowed number of workflow tasks that will ever be given to this worker at one time. Note that one workflow task may require multiple activations - so the WFT counts as “outstanding” until all activations it requires have been completed. Must be at least 2 if max_cached_workflows is > 0, or is an error.

Mutually exclusive with tuner

Source

pub fn maybe_max_outstanding_workflow_tasks( self, value: Option<impl Into<usize>>, ) -> WorkerConfigBuilder<SetMaxOutstandingWorkflowTasks<S>>
where S::MaxOutstandingWorkflowTasks: IsUnset,

Optional (Some / Option setters).

The maximum allowed number of workflow tasks that will ever be given to this worker at one time. Note that one workflow task may require multiple activations - so the WFT counts as “outstanding” until all activations it requires have been completed. Must be at least 2 if max_cached_workflows is > 0, or is an error.

Mutually exclusive with tuner

Source

pub fn max_outstanding_activities( self, value: impl Into<usize>, ) -> WorkerConfigBuilder<SetMaxOutstandingActivities<S>>
where S::MaxOutstandingActivities: IsUnset,

Optional (Some / Option setters).

The maximum number of activity tasks that will ever be given to this worker concurrently.

Mutually exclusive with tuner

Source

pub fn maybe_max_outstanding_activities( self, value: Option<impl Into<usize>>, ) -> WorkerConfigBuilder<SetMaxOutstandingActivities<S>>
where S::MaxOutstandingActivities: IsUnset,

Optional (Some / Option setters).

The maximum number of activity tasks that will ever be given to this worker concurrently.

Mutually exclusive with tuner

Source

pub fn max_outstanding_local_activities( self, value: impl Into<usize>, ) -> WorkerConfigBuilder<SetMaxOutstandingLocalActivities<S>>
where S::MaxOutstandingLocalActivities: IsUnset,

Optional (Some / Option setters).

The maximum number of local activity tasks that will ever be given to this worker concurrently.

Mutually exclusive with tuner

Source

pub fn maybe_max_outstanding_local_activities( self, value: Option<impl Into<usize>>, ) -> WorkerConfigBuilder<SetMaxOutstandingLocalActivities<S>>
where S::MaxOutstandingLocalActivities: IsUnset,

Optional (Some / Option setters).

The maximum number of local activity tasks that will ever be given to this worker concurrently.

Mutually exclusive with tuner

Source

pub fn max_outstanding_nexus_tasks( self, value: impl Into<usize>, ) -> WorkerConfigBuilder<SetMaxOutstandingNexusTasks<S>>
where S::MaxOutstandingNexusTasks: IsUnset,

Optional (Some / Option setters).

The maximum number of nexus tasks that will ever be given to this worker concurrently.

Mutually exclusive with tuner

Source

pub fn maybe_max_outstanding_nexus_tasks( self, value: Option<impl Into<usize>>, ) -> WorkerConfigBuilder<SetMaxOutstandingNexusTasks<S>>
where S::MaxOutstandingNexusTasks: IsUnset,

Optional (Some / Option setters).

The maximum number of nexus tasks that will ever be given to this worker concurrently.

Mutually exclusive with tuner

Source

pub fn versioning_strategy( self, value: WorkerVersioningStrategy, ) -> WorkerConfigBuilder<SetVersioningStrategy<S>>
where S::VersioningStrategy: IsUnset,

Required.

A versioning strategy for this worker.

Source

pub fn plugins( self, value: HashSet<PluginInfo>, ) -> WorkerConfigBuilder<SetPlugins<S>>
where S::Plugins: IsUnset,

Optional (Some / Option setters). Default: <HashSet<PluginInfo> as Default>::default().

List of plugins used by lang.

Source

pub fn maybe_plugins( self, value: Option<HashSet<PluginInfo>>, ) -> WorkerConfigBuilder<SetPlugins<S>>
where S::Plugins: IsUnset,

Optional (Some / Option setters). Default: <HashSet<PluginInfo> as Default>::default().

List of plugins used by lang.

Source

pub fn skip_client_worker_set_check( self, value: bool, ) -> WorkerConfigBuilder<SetSkipClientWorkerSetCheck<S>>
where S::SkipClientWorkerSetCheck: IsUnset,

Optional (Some / Option setters). Default: false.

Skips the single worker+client+namespace+task_queue check

Source

pub fn maybe_skip_client_worker_set_check( self, value: Option<bool>, ) -> WorkerConfigBuilder<SetSkipClientWorkerSetCheck<S>>
where S::SkipClientWorkerSetCheck: IsUnset,

Optional (Some / Option setters). Default: false.

Skips the single worker+client+namespace+task_queue check

Source

pub fn storage_drivers( self, value: HashSet<StorageDriverInfo>, ) -> WorkerConfigBuilder<SetStorageDrivers<S>>
where S::StorageDrivers: IsUnset,

Optional (Some / Option setters). Default: <HashSet<StorageDriverInfo> as Default>::default().

List of storage drivers used by lang.

Source

pub fn maybe_storage_drivers( self, value: Option<HashSet<StorageDriverInfo>>, ) -> WorkerConfigBuilder<SetStorageDrivers<S>>
where S::StorageDrivers: IsUnset,

Optional (Some / Option setters). Default: <HashSet<StorageDriverInfo> as Default>::default().

List of storage drivers used by lang.

Source§

impl<S: IsComplete> WorkerConfigBuilder<S>

Source

pub fn build(self) -> Result<WorkerConfig, String>

Build and validate the worker configuration

Auto Trait Implementations§

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> Any for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Source§

fn type_name(&self) -> &'static str

Source§

impl<T> AnySync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

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

Source§

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>,

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,