pub struct SynchronizerTaskHandle { /* private fields */ }Expand description
Handle for controlling a running synchronizer task.
This handle provides methods to gracefully shut down the synchronizer and await its completion with a timeout.
Implementations§
Source§impl SynchronizerTaskHandle
StateSynchronizer
impl SynchronizerTaskHandle
StateSynchronizer
Used to synchronize the state of a single protocol. The synchronizer is responsible for delivering messages to the client that let him reconstruct subsets of the protocol state.
This involves deciding which components to track according to the clients preferences, retrieving & emitting snapshots of components which the client has not seen yet and subsequently delivering delta messages for the components that have changed.
pub fn new(join_handle: JoinHandle<()>, close_tx: Sender<()>) -> Self
Sourcepub fn split(self) -> (JoinHandle<()>, Sender<()>)
pub fn split(self) -> (JoinHandle<()>, Sender<()>)
Splits the handle into its join handle and close sender.
This allows monitoring the task completion separately from controlling shutdown. The join handle can be used with FuturesUnordered for monitoring, while the close sender can be used to signal graceful shutdown.
Auto Trait Implementations§
impl Freeze for SynchronizerTaskHandle
impl !RefUnwindSafe for SynchronizerTaskHandle
impl Send for SynchronizerTaskHandle
impl Sync for SynchronizerTaskHandle
impl Unpin for SynchronizerTaskHandle
impl UnsafeUnpin for SynchronizerTaskHandle
impl !UnwindSafe for SynchronizerTaskHandle
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
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>
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>
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