pub struct Replicator { /* private fields */ }
Expand description

Replicator of database

Implementations

Arguments
  • url - should be something like “ws://192.168.1.132:4984/demo/”
  • validation_cb - Callback that can reject incoming revisions. Arguments: collection_name, doc_id, rev_id, rev_flags, doc_body. It should return false to reject document.
  • state_changed_callback - reports back change of replicator state
  • documents_ended_callback - reports about the replication status of documents

starts database replication

  • reset - If true, the replicator will reset its checkpoint and start replication from the beginning.

Full recreation of database replicator except callbacks,

  • url - new url
  • auth - new auth information
  • reset - If true, the replicator will reset its checkpoint and start replication from the beginning.

Tells a replicator that’s in the offline state to reconnect immediately. return true if the replicator will reconnect, false if it won’t.

Trait Implementations

Executes the destructor for this type. Read more

it should be safe to call replicator API from any thread according to https://github.com/couchbase/couchbase-lite-core/wiki/Thread-Safety

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.