Skip to main content

ThingStore

Trait ThingStore 

Source
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 search_rebuild_status(&self) -> Option<SearchRebuildStatus> { ... }
    fn storage_diagnostics(&self) -> ThingdResult<StorageDiagnostics> { ... }
}
Expand description

Full storage interface expected from thingd engine adapters.

Provided Methods§

Source

fn search_rebuild_required(&self) -> bool

Return whether the adapter has an asynchronous derived search rebuild that should be progressed by the hosting runtime.

Source

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.

Source

fn search_rebuild_status(&self) -> Option<SearchRebuildStatus>

Available on crate feature persistent only.

Return backend-specific asynchronous search rebuild status, when supported.

Source

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§

Source§

impl ThingStore for MemoryEngine

Source§

impl ThingStore for PersistentEngine

Available on crate feature persistent only.