pub struct WorkerConfigBuilder { /* private fields */ }Expand description
Builder for WorkerConfig with auth metadata defaults and explicit required fields.
Implementations§
Source§impl WorkerConfigBuilder
impl WorkerConfigBuilder
Sourcepub fn namespace(self, namespace: impl Into<String>) -> Self
pub fn namespace(self, namespace: impl Into<String>) -> Self
Sets the namespace advertised in worker stream authorization metadata.
Sourcepub fn subject(self, subject: impl Into<String>) -> Self
pub fn subject(self, subject: impl Into<String>) -> Self
Sets the subject advertised in worker stream authorization metadata.
Sourcepub fn endpoint(self, endpoint: impl Into<String>) -> Self
pub fn endpoint(self, endpoint: impl Into<String>) -> Self
Sets the engine worker endpoint URI.
Sourcepub fn task_queue(self, task_queue: impl Into<String>) -> Self
pub fn task_queue(self, task_queue: impl Into<String>) -> Self
Sets the task queue advertised to the engine.
Sourcepub const fn max_concurrency(self, max_concurrency: usize) -> Self
pub const fn max_concurrency(self, max_concurrency: usize) -> Self
Sets the operator-configured maximum concurrency.
Sourcepub const fn reconnect_initial_backoff(self, delay: Duration) -> Self
pub const fn reconnect_initial_backoff(self, delay: Duration) -> Self
Sets the operator-configured initial reconnect backoff delay.
Sourcepub const fn reconnect_max_backoff(self, delay: Duration) -> Self
pub const fn reconnect_max_backoff(self, delay: Duration) -> Self
Sets the operator-configured reconnect backoff cap.
Sourcepub const fn reconnect_max_attempts(self, attempts: usize) -> Self
pub const fn reconnect_max_attempts(self, attempts: usize) -> Self
Sets the operator-configured maximum reconnect attempts.
Sourcepub fn transport_credentials(self, credentials: TransportCredentials) -> Self
pub fn transport_credentials(self, credentials: TransportCredentials) -> Self
Sets optional opaque transport credentials.
Sourcepub fn build(self) -> Result<WorkerConfig, WorkerConfigBuildError>
pub fn build(self) -> Result<WorkerConfig, WorkerConfigBuildError>
Builds a WorkerConfig when every required field has been supplied.
§Errors
Returns WorkerConfigBuildError naming the missing required field.
Trait Implementations§
Source§impl Clone for WorkerConfigBuilder
impl Clone for WorkerConfigBuilder
Source§fn clone(&self) -> WorkerConfigBuilder
fn clone(&self) -> WorkerConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkerConfigBuilder
impl Debug for WorkerConfigBuilder
Source§impl Default for WorkerConfigBuilder
impl Default for WorkerConfigBuilder
Source§fn default() -> WorkerConfigBuilder
fn default() -> WorkerConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkerConfigBuilder
impl RefUnwindSafe for WorkerConfigBuilder
impl Send for WorkerConfigBuilder
impl Sync for WorkerConfigBuilder
impl Unpin for WorkerConfigBuilder
impl UnsafeUnpin for WorkerConfigBuilder
impl UnwindSafe for WorkerConfigBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request