Struct ockam::WorkerBuilder
source · pub struct WorkerBuilder<W>{ /* private fields */ }
Expand description
Start a Worker
with a custom configuration
Varying use-cases should use the builder API to customise the underlying worker that is created.
Implementations§
source§impl<W> WorkerBuilder<W>
impl<W> WorkerBuilder<W>
sourcepub fn new(worker: W) -> WorkerBuilder<W>
pub fn new(worker: W) -> WorkerBuilder<W>
Create a new builder for a given Worker. Default AccessControl is AllowAll
source§impl<W> WorkerBuilder<W>
impl<W> WorkerBuilder<W>
sourcepub fn with_address(
self,
address: impl Into<Address>
) -> WorkerBuilderOneAddress<W>
pub fn with_address( self, address: impl Into<Address> ) -> WorkerBuilderOneAddress<W>
Worker with only one Address
sourcepub fn with_mailboxes(
self,
mailboxes: Mailboxes
) -> WorkerBuilderMultipleAddresses<W>
pub fn with_mailboxes( self, mailboxes: Mailboxes ) -> WorkerBuilderMultipleAddresses<W>
Worker with multiple Address
es
Auto Trait Implementations§
impl<W> Freeze for WorkerBuilder<W>where
W: Freeze,
impl<W> RefUnwindSafe for WorkerBuilder<W>where
W: RefUnwindSafe,
impl<W> Send for WorkerBuilder<W>
impl<W> Sync for WorkerBuilder<W>where
W: Sync,
impl<W> Unpin for WorkerBuilder<W>where
W: Unpin,
impl<W> UnwindSafe for WorkerBuilder<W>where
W: UnwindSafe,
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> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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 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> ⓘ
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