pub struct SyncSession { /* private fields */ }Expand description
Orchestrates a sync session between two databases.
The initiator drives the protocol: sends Hello, computes diffs, builds patches, and coordinates push/pull phases. The responder answers requests and applies patches.
Implementations§
Source§impl SyncSession
impl SyncSession
pub fn new(config: SyncConfig) -> Self
Sourcepub fn sync_as_initiator(
&self,
manager: &TxnManager,
transport: &dyn SyncTransport,
) -> Result<SyncOutcome, SyncError>
pub fn sync_as_initiator( &self, manager: &TxnManager, transport: &dyn SyncTransport, ) -> Result<SyncOutcome, SyncError>
Run as the initiator (client) side of a sync session.
Sourcepub fn sync_as_responder(
&self,
manager: &TxnManager,
transport: &dyn SyncTransport,
) -> Result<SyncOutcome, SyncError>
pub fn sync_as_responder( &self, manager: &TxnManager, transport: &dyn SyncTransport, ) -> Result<SyncOutcome, SyncError>
Run as the responder (server) side of a sync session.
Sourcepub fn sync_tables_as_initiator(
&self,
manager: &TxnManager,
transport: &dyn SyncTransport,
) -> Result<Vec<(Vec<u8>, ApplyResult)>, SyncError>
pub fn sync_tables_as_initiator( &self, manager: &TxnManager, transport: &dyn SyncTransport, ) -> Result<Vec<(Vec<u8>, ApplyResult)>, SyncError>
Run multi-table sync as the initiator.
Sourcepub fn handle_table_sync_as_responder(
&self,
manager: &TxnManager,
transport: &dyn SyncTransport,
) -> Result<Vec<(Vec<u8>, ApplyResult)>, SyncError>
pub fn handle_table_sync_as_responder( &self, manager: &TxnManager, transport: &dyn SyncTransport, ) -> Result<Vec<(Vec<u8>, ApplyResult)>, SyncError>
Handle multi-table sync as the responder.
Auto Trait Implementations§
impl Freeze for SyncSession
impl RefUnwindSafe for SyncSession
impl Send for SyncSession
impl Sync for SyncSession
impl Unpin for SyncSession
impl UnsafeUnpin for SyncSession
impl UnwindSafe for SyncSession
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