pub trait ThingStore:
EventLog
+ ObjectStore
+ QueueStore
+ Searcher
+ LinkStore
+ AggregateStore
+ VectorStore
+ SchemaStore {
// Provided methods
fn search_rebuild_required(&self) -> bool { ... }
fn search_rebuild_step(&mut self, _batch_size: usize) -> ThingdResult<bool> { ... }
fn retry_search_rebuild(&mut self) -> bool { ... }
fn search_rebuild_status(&self) -> Option<SearchRebuildStatus> { ... }
fn storage_maintenance_status(&self) -> StorageMaintenanceStatus { ... }
fn compact_storage(&mut self) -> ThingdResult<()> { ... }
fn storage_diagnostics(&self) -> ThingdResult<StorageDiagnostics> { ... }
}Expand description
Full storage interface expected from thingd engine adapters.
Provided Methods§
Sourcefn search_rebuild_required(&self) -> bool
fn search_rebuild_required(&self) -> bool
Return whether the adapter has an asynchronous derived search rebuild that should be progressed by the hosting runtime.
Sourcefn search_rebuild_step(&mut self, _batch_size: usize) -> ThingdResult<bool>
fn search_rebuild_step(&mut self, _batch_size: usize) -> ThingdResult<bool>
Process one bounded asynchronous search rebuild batch.
§Errors
Returns a storage error when the adapter cannot advance the rebuild.
Sourcefn retry_search_rebuild(&mut self) -> bool
fn retry_search_rebuild(&mut self) -> bool
Retry a degraded search rebuild when bounded recovery permits another generation.
Sourcefn search_rebuild_status(&self) -> Option<SearchRebuildStatus>
Available on crate feature persistent only.
fn search_rebuild_status(&self) -> Option<SearchRebuildStatus>
persistent only.Return backend-specific asynchronous search rebuild status, when supported.
Sourcefn storage_maintenance_status(&self) -> StorageMaintenanceStatus
fn storage_maintenance_status(&self) -> StorageMaintenanceStatus
Return backend-specific storage maintenance state.
Sourcefn compact_storage(&mut self) -> ThingdResult<()>
fn compact_storage(&mut self) -> ThingdResult<()>
Compact the primary durable store when supported.
§Errors
Returns an error when the backend cannot persist or compact its data.
Sourcefn storage_diagnostics(&self) -> ThingdResult<StorageDiagnostics>
fn storage_diagnostics(&self) -> ThingdResult<StorageDiagnostics>
Return bounded storage diagnostics. Adapters may add backend-specific details through their own APIs without changing this stable summary.
§Errors
Returns an error when the backing store cannot read its counts.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ThingStore for MemoryEngine
impl ThingStore for PersistentEngine
persistent only.