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> Freeze for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>
impl<StateCallback, DocumentsEndedCallback, ValidationF> RefUnwindSafe for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>where
ValidationF: RefUnwindSafe,
StateCallback: RefUnwindSafe,
DocumentsEndedCallback: RefUnwindSafe,
impl<StateCallback, DocumentsEndedCallback, ValidationF> Send for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>
impl<StateCallback, DocumentsEndedCallback, ValidationF> Sync for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>
impl<StateCallback, DocumentsEndedCallback, ValidationF> Unpin for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>
impl<StateCallback, DocumentsEndedCallback, ValidationF> UnwindSafe for ReplicatorParameters<StateCallback, DocumentsEndedCallback, ValidationF>
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