pub struct StateSynchronizer { /* private fields */ }Expand description
State synchronization manager for distributed environments
Implementations§
Source§impl StateSynchronizer
impl StateSynchronizer
Sourcepub fn new(
local_state: Arc<StateManager>,
config: SyncConfig,
conflict_resolution: ConflictResolution,
) -> Self
pub fn new( local_state: Arc<StateManager>, config: SyncConfig, conflict_resolution: ConflictResolution, ) -> Self
Create a new state synchronizer
Sourcepub fn add_remote(&mut self, remote_state: Arc<StateManager>)
pub fn add_remote(&mut self, remote_state: Arc<StateManager>)
Add a remote state manager
Sourcepub fn synchronize(&self) -> SklResult<SyncResult>
pub fn synchronize(&self) -> SklResult<SyncResult>
Synchronize state with all remotes
Auto Trait Implementations§
impl Freeze for StateSynchronizer
impl RefUnwindSafe for StateSynchronizer
impl Send for StateSynchronizer
impl Sync for StateSynchronizer
impl Unpin for StateSynchronizer
impl UnwindSafe for StateSynchronizer
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 more