pub struct WorkerHandle { /* private fields */ }Expand description
Handle for an embedded timely worker running inside a tokio blocking task.
Implementations§
Source§impl WorkerHandle
impl WorkerHandle
Sourcepub async fn build(
&self,
build: impl FnOnce(&mut LocalTimelyWorker) + Send + 'static,
) -> Result<(), WorkerError>
pub async fn build( &self, build: impl FnOnce(&mut LocalTimelyWorker) + Send + 'static, ) -> Result<(), WorkerError>
Applies a build closure inside the worker task.
Sourcepub async fn step(&self) -> Result<(), WorkerError>
pub async fn step(&self) -> Result<(), WorkerError>
Drives the timely worker for one bounded step tick.
Sourcepub async fn stop(self) -> Result<WorkerStats, WorkerError>
pub async fn stop(self) -> Result<WorkerStats, WorkerError>
Stops the worker and returns final loop statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkerHandle
impl RefUnwindSafe for WorkerHandle
impl Send for WorkerHandle
impl Sync for WorkerHandle
impl Unpin for WorkerHandle
impl UnsafeUnpin for WorkerHandle
impl UnwindSafe for WorkerHandle
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> 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 moreSource§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
Source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign, for types that do not implement AddAssign.