pub struct Primadb { /* private fields */ }Implementations§
Source§impl Primadb
impl Primadb
pub fn with_replica_id(replica_id: impl Into<String>) -> Self
pub fn replica_id(&self) -> String
pub fn root(&self, node: impl Into<String>) -> Chain
pub fn snapshot(&self) -> DatabaseSnapshot
pub fn export_snapshot_json(&self) -> Result<String>
pub fn export_persisted_snapshot_json(&self) -> Result<String>
pub fn import_snapshot_json(&self, payload: &str) -> Result<()>
pub fn merge_snapshot_json(&self, payload: &str) -> Result<()>
pub fn import_persisted_snapshot_json(&self, payload: &str) -> Result<()>
pub fn load_snapshot(&self, snapshot: DatabaseSnapshot) -> Result<()>
pub fn merge_snapshot(&self, snapshot: DatabaseSnapshot) -> Result<()>
pub fn pending_operations(&self) -> Vec<Operation>
pub fn change_revision(&self) -> u64
pub fn sync_envelope(&self) -> SyncEnvelope
pub fn drain_pending_operations(&self) -> Result<Vec<Operation>>
pub fn requeue_pending_operations<I>(&self, ops: I) -> Result<usize>where
I: IntoIterator<Item = Operation>,
pub fn drain_sync_envelope(&self) -> Result<SyncEnvelope>
pub fn export_pending_operations_json(&self) -> Result<String>
pub fn drain_pending_operations_json(&self) -> Result<String>
pub fn apply_operation(&self, op: Operation) -> Result<bool>
pub fn apply_operations<I>(&self, ops: I) -> Result<usize>where
I: IntoIterator<Item = Operation>,
pub fn apply_sync_envelope(&self, envelope: SyncEnvelope) -> Result<usize>
pub fn apply_operations_json(&self, payload: &str) -> Result<usize>
pub fn get_path(&self, path: &RemotePath) -> Result<Option<JsonValue>>
pub fn map_path(&self, path: &RemotePath) -> Result<Vec<MapEntry>>
pub fn query_path( &self, path: &RemotePath, spec: &QuerySpec, ) -> Result<Vec<MapEntry>>
pub fn lex_path( &self, path: &RemotePath, spec: &LexSpec, ) -> Result<Vec<LexEntry>>
pub fn snapshot_for_root(&self, root: Option<&str>) -> DatabaseSnapshot
pub fn execute_pull_request_kind( &self, request: &PullRequestKind, ) -> Result<RemoteResult>
pub fn execute_pull_request( &self, request: &PullRequest, ) -> Result<RemoteResult>
pub fn chunk_remote_result( &self, request_id: &str, result: RemoteResult, ) -> Vec<PullResponse>
pub fn chunk_watch_result( &self, watch_id: &str, sequence: u64, initial: bool, result: RemoteResult, ) -> Vec<WatchEvent>
pub fn subscribe_changes(&self) -> ChangeSubscription
pub fn stats(&self) -> PrimadbStats
pub fn limits(&self) -> PrimadbLimits
pub fn set_limits(&self, limits: PrimadbLimits)
pub fn set_network_hooks(&self, hooks: Arc<dyn NetworkHooks>)
pub fn clear_network_hooks(&self)
pub fn use_file_persistence(&self, path: impl Into<PathBuf>) -> Result<bool>
pub fn use_radisk_storage( &self, directory: impl Into<PathBuf>, compaction_threshold: usize, ) -> Result<bool>
pub fn open_durable_storage( &self, config: DurableStorageConfig, ) -> Result<DurableStorageBinding>
pub fn attach_blob_store(&self, store: Arc<dyn BlobStore>)
pub fn open_blob_storage( &self, config: BlobStorageConfig, ) -> Result<BlobStorageBinding>
pub fn store_blob( &self, data: impl AsRef<[u8]>, media_type: Option<&str>, ) -> Result<BlobRef>
pub fn get_blob(&self, blob_id: &str) -> Result<Option<StoredBlob>>
pub fn vacuum_storage(&self) -> Result<VacuumReport>
pub fn has_blob(&self, blob_id: &str) -> Result<bool>
pub fn attach_storage_adapter( &self, adapter: Arc<dyn StorageAdapter>, ) -> Result<bool>
pub fn attach_incremental_store( &self, store: Arc<dyn IncrementalStore>, ) -> Result<bool>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Primadb
impl RefUnwindSafe for Primadb
impl Send for Primadb
impl Sync for Primadb
impl Unpin for Primadb
impl UnwindSafe for Primadb
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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