Struct couchbase_lite::ReplicatorParameters
source · pub struct ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF> { /* private fields */ }Expand description
Parameters describing a replication, used when creating Replicator
Implementations§
source§impl<SC, DEC, V> ReplicatorParameters<SC, DEC, V>
impl<SC, DEC, V> ReplicatorParameters<SC, DEC, V>
pub fn with_auth(self, auth: ReplicatorAuthentication) -> Self
sourcepub fn with_validation_func<ValidationF>(
self,
validation_cb: ValidationF
) -> ReplicatorParameters<SC, DEC, ValidationF>where
ValidationF: ReplicatorValidationFunction,
pub fn with_validation_func<ValidationF>( self, validation_cb: ValidationF ) -> ReplicatorParameters<SC, DEC, ValidationF>where ValidationF: ReplicatorValidationFunction,
Set callback that can reject incoming revisions. Arguments: collection_name, doc_id, rev_id, rev_flags, doc_body. It should return false to reject document.
sourcepub fn with_state_changed_callback<StateCallback>(
self,
state_changed_callback: StateCallback
) -> ReplicatorParameters<StateCallback, DEC, V>where
StateCallback: ReplicatorStatusChangedCallback,
pub fn with_state_changed_callback<StateCallback>( self, state_changed_callback: StateCallback ) -> ReplicatorParameters<StateCallback, DEC, V>where StateCallback: ReplicatorStatusChangedCallback,
Set callback to reports back change of replicator state
sourcepub fn with_documents_ended_callback<DocumentsEndedCallback>(
self,
documents_ended_callback: DocumentsEndedCallback
) -> ReplicatorParameters<SC, DocumentsEndedCallback, V>where
DocumentsEndedCallback: ReplicatorDocumentsEndedCallback,
pub fn with_documents_ended_callback<DocumentsEndedCallback>( self, documents_ended_callback: DocumentsEndedCallback ) -> ReplicatorParameters<SC, DocumentsEndedCallback, V>where DocumentsEndedCallback: ReplicatorDocumentsEndedCallback,
Set callback to reports about the replication status of documents
sourcepub fn with_push_mode(self, push: C4ReplicatorMode) -> Self
pub fn with_push_mode(self, push: C4ReplicatorMode) -> Self
Set push mode (from db to remote/other db)
sourcepub fn with_pull_mode(self, pull: C4ReplicatorMode) -> Self
pub fn with_pull_mode(self, pull: C4ReplicatorMode) -> Self
Set pull mode (from db to remote/other db)
Trait Implementations§
Auto Trait Implementations§
impl<StateCallback, DocumentsEndedCallback, ValidationF> RefUnwindSafe for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>where DocumentsEndedCallback: RefUnwindSafe, StateCallback: RefUnwindSafe, ValidationF: RefUnwindSafe,
impl<StateCallback, DocumentsEndedCallback, ValidationF> Send for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>where DocumentsEndedCallback: Send, StateCallback: Send, ValidationF: Send,
impl<StateCallback, DocumentsEndedCallback, ValidationF> Sync for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>where DocumentsEndedCallback: Sync, StateCallback: Sync, ValidationF: Sync,
impl<StateCallback, DocumentsEndedCallback, ValidationF> Unpin for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>where DocumentsEndedCallback: Unpin, StateCallback: Unpin, ValidationF: Unpin,
impl<StateCallback, DocumentsEndedCallback, ValidationF> UnwindSafe for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>where DocumentsEndedCallback: UnwindSafe, StateCallback: UnwindSafe, ValidationF: 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