pub struct Worker<H, F>{ /* private fields */ }
Expand description
Worker process handler.
Implementations§
Source§impl<H, F> Worker<H, F>
impl<H, F> Worker<H, F>
Sourcepub fn relaxed(self, flag: bool) -> Self
pub fn relaxed(self, flag: bool) -> Self
Set the relaxed flag.
When a worker is relaxed it will start with or without a supervisor.
The default is false
so workers expect to be run in the context
of a supervisor and it is an error if no worker id is available in
the environment.
When this flag is enabled and the required environment variables do not exist the worker does not attempt to connect to a supervisor.
Use this mode of operation when a worker process can be run standalone or as a worker for a supervisor process.
Auto Trait Implementations§
impl<H, F> Freeze for Worker<H, F>where
H: Freeze,
impl<H, F> RefUnwindSafe for Worker<H, F>where
H: RefUnwindSafe,
impl<H, F> Send for Worker<H, F>where
H: Send,
impl<H, F> Sync for Worker<H, F>where
H: Sync,
impl<H, F> Unpin for Worker<H, F>where
H: Unpin,
impl<H, F> UnwindSafe for Worker<H, F>where
H: 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