pub struct NodeDbLite<S: StorageEngine> { /* private fields */ }Expand description
NodeDB-Lite — the embedded edge database.
Fully capable of vector search, graph traversal, and document CRUD entirely offline. Optional sync to Origin via WebSocket.
Implementations§
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn create_array(
&self,
name: &str,
schema: ArraySchema,
) -> NodeDbResult<()>
pub async fn create_array( &self, name: &str, schema: ArraySchema, ) -> NodeDbResult<()>
Create a new ND sparse array with the given schema.
Returns an error if an array named name already exists.
Sourcepub async fn array_put_cell(
&self,
name: &str,
coord: Vec<CoordValue>,
attrs: Vec<CellValue>,
system_from_ms: i64,
valid_from_ms: i64,
valid_until_ms: i64,
) -> NodeDbResult<()>
pub async fn array_put_cell( &self, name: &str, coord: Vec<CoordValue>, attrs: Vec<CellValue>, system_from_ms: i64, valid_from_ms: i64, valid_until_ms: i64, ) -> NodeDbResult<()>
Write a cell into array name at coord.
system_from_ms is the bitemporal system time (typically now()).
valid_from_ms / valid_until_ms are the valid-time bounds
(OPEN_UPPER = open-ended, no expiry).
Sourcepub async fn array_slice(
&self,
name: &str,
ranges: Vec<Option<DimRange>>,
as_of_system_ms: Option<i64>,
) -> NodeDbResult<Vec<CellPayload>>
pub async fn array_slice( &self, name: &str, ranges: Vec<Option<DimRange>>, as_of_system_ms: Option<i64>, ) -> NodeDbResult<Vec<CellPayload>>
Slice query: return all live cells whose coordinates fall within
ranges at or before as_of_system_ms (defaults to i64::MAX for
the current live snapshot).
Sourcepub async fn array_read_coord(
&self,
name: &str,
coord: &[CoordValue],
as_of_system_ms: Option<i64>,
) -> NodeDbResult<Option<CellPayload>>
pub async fn array_read_coord( &self, name: &str, coord: &[CoordValue], as_of_system_ms: Option<i64>, ) -> NodeDbResult<Option<CellPayload>>
Read the most recent live payload for coord at or before
as_of_system_ms. Returns None if not found, tombstoned, or erased.
Sourcepub async fn array_delete_cell(
&self,
name: &str,
coord: Vec<CoordValue>,
system_from_ms: i64,
) -> NodeDbResult<()>
pub async fn array_delete_cell( &self, name: &str, coord: Vec<CoordValue>, system_from_ms: i64, ) -> NodeDbResult<()>
Soft-delete a cell by writing a tombstone version at system_from_ms.
The cell is still visible AS-OF any system time < system_from_ms.
Sourcepub async fn array_gdpr_erase_cell(
&self,
name: &str,
coord: Vec<CoordValue>,
system_from_ms: i64,
) -> NodeDbResult<()>
pub async fn array_gdpr_erase_cell( &self, name: &str, coord: Vec<CoordValue>, system_from_ms: i64, ) -> NodeDbResult<()>
GDPR erasure: write the 0xFE sentinel and flush to disk.
After this call array_read_coord returns None for the erased
coordinate at any system_as_of >= system_from_ms, and the raw
payload bytes are not present on disk.
Sourcepub async fn array_flush(&self, name: &str) -> NodeDbResult<()>
pub async fn array_flush(&self, name: &str) -> NodeDbResult<()>
Flush any pending memtable data for name to a durable segment.
Sourcepub fn array_schema_hlc(&self, name: &str) -> Option<Hlc>
pub fn array_schema_hlc(&self, name: &str) -> Option<Hlc>
Return the current schema HLC for name from the local schema registry.
Used by tests that need to construct ArrayOpHeader::schema_hlc values
matching the locally registered schema.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn batch_vector_insert(
&self,
collection: &str,
vectors: &[(&str, &[f32])],
) -> NodeDbResult<()>
pub async fn batch_vector_insert( &self, collection: &str, vectors: &[(&str, &[f32])], ) -> NodeDbResult<()>
Batch insert vectors — O(1) CRDT delta export instead of O(N).
Use this for bulk loading (cold-start hydration, benchmark setup, imports). Each vector is inserted into HNSW and tracked in the ID map. An id repeated in the batch, or already indexed, keeps one node: the latest vector. Each id’s embedding dimension merges into its CRDT row, whose other fields are kept.
Sourcepub async fn batch_graph_insert_edges(
&self,
collection: &str,
edges: &[(NodeId, NodeId, &str, Option<Document>)],
) -> NodeDbResult<Vec<EdgeId>>
pub async fn batch_graph_insert_edges( &self, collection: &str, edges: &[(NodeId, NodeId, &str, Option<Document>)], ) -> NodeDbResult<Vec<EdgeId>>
Batch insert graph edges into a named collection — O(1) CRDT delta
export instead of O(N). Edges are isolated to collection.
Mirrors graph_insert_edge’s argument order (from, to, edge_type, properties) and shares its edge-preparation logic (EdgeId
allocation, CRDT field list): a batch of one edge stores the same
EdgeId key and the same fields a single graph_insert_edge call
would, so graph_delete_edge can remove either durably and rebuild
never resurrects a deleted batch-inserted edge.
Bitemporal history is recorded per edge when collection is
bitemporal, and memory stats are updated once at the end. Returns
the allocated EdgeId for each input edge, in order.
Sourcepub fn compact_graph(&self) -> NodeDbResult<()>
pub fn compact_graph(&self) -> NodeDbResult<()>
Compact all per-collection CSR graph indices (merge buffer into dense arrays).
Sourcepub async fn evict_collections(
&self,
max_to_evict: usize,
) -> NodeDbResult<usize>
pub async fn evict_collections( &self, max_to_evict: usize, ) -> NodeDbResult<usize>
Evict HNSW collections to reduce memory usage.
Persists each evicted collection to storage first, then drops it from memory. Collections are evicted smallest-first.
Sourcepub async fn check_and_evict(&self) -> NodeDbResult<usize>
pub async fn check_and_evict(&self) -> NodeDbResult<usize>
Check memory pressure and evict if needed.
Matches the old thresholds: nodedb_mem’s Critical (85-95%) is where Lite’s own Warning used to start, and Emergency (>95%) is where Lite’s own Critical used to start. The new Warning tier (70-85%) is below both old thresholds, so it evicts nothing, same as Normal.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn bulk_update(
&self,
collection: &str,
filters: &[ScanFilter],
updates: &HashMap<String, Value>,
) -> NodeDbResult<u64>
pub fn bulk_update( &self, collection: &str, filters: &[ScanFilter], updates: &HashMap<String, Value>, ) -> NodeDbResult<u64>
Bulk update documents matching a predicate.
Scans all documents, evaluates ScanFilter predicates, and applies
updates to matching documents — all under a single CRDT lock to
prevent concurrent writes from being lost between scan and update.
Returns the number of documents updated.
Sourcepub fn bulk_delete(
&self,
collection: &str,
filters: &[ScanFilter],
) -> NodeDbResult<u64>
pub fn bulk_delete( &self, collection: &str, filters: &[ScanFilter], ) -> NodeDbResult<u64>
Bulk delete documents matching a predicate.
Same single-lock pattern as bulk_update.
Returns the number of documents deleted.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn create_collection(
&self,
name: &str,
fields: &[(String, String)],
) -> NodeDbResult<()>
pub async fn create_collection( &self, name: &str, fields: &[(String, String)], ) -> NodeDbResult<()>
Create a collection with optional schema.
If the collection already exists, returns Ok (idempotent). Schema is advisory — documents are schemaless by default.
Sourcepub async fn create_kv_collection(
&self,
name: &str,
config: &KvConfig,
) -> NodeDbResult<()>
pub async fn create_kv_collection( &self, name: &str, config: &KvConfig, ) -> NodeDbResult<()>
Create a KV collection with typed schema and optional TTL.
Stores the KvConfig as JSON in the collection metadata so that the
KV engine can reconstruct the schema on startup.
Sourcepub async fn drop_collection(&self, name: &str) -> NodeDbResult<()>
pub async fn drop_collection(&self, name: &str) -> NodeDbResult<()>
Drop a collection — deletes all documents and metadata.
Uses clear_collection for single-batch deletion (one Loro delta
for all document removals). Also removes the secondary and text
indexes.
Sourcepub async fn list_collections(&self) -> NodeDbResult<Vec<CollectionMeta>>
pub async fn list_collections(&self) -> NodeDbResult<Vec<CollectionMeta>>
List all collections.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn copy_from_ndjson(
&self,
collection: &str,
ndjson: &str,
) -> NodeDbResult<u64>
pub async fn copy_from_ndjson( &self, collection: &str, ndjson: &str, ) -> NodeDbResult<u64>
Import documents from NDJSON (newline-delimited JSON) text.
Each line is a JSON object. The “id” field is used as document ID; if missing, a UUID v7 is generated.
Returns the number of documents imported.
Sourcepub async fn copy_from_csv(
&self,
collection: &str,
csv_text: &str,
) -> NodeDbResult<u64>
pub async fn copy_from_csv( &self, collection: &str, csv_text: &str, ) -> NodeDbResult<u64>
Import documents from CSV text.
First line is the header (column names). Each subsequent line is a row. An “id” column is used as document ID; if missing, UUIDs are generated.
Two-pass: first pass infers column types (int/float/bool/string) from ALL rows. Second pass coerces every value to the column’s dominant type. This ensures type consistency within each column.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn kv_put(
&self,
collection: &str,
key: &str,
value: &[u8],
) -> NodeDbResult<()>
pub async fn kv_put( &self, collection: &str, key: &str, value: &[u8], ) -> NodeDbResult<()>
KV PUT: store a key-value pair with no expiry.
Buffered in memory — call kv_flush() to commit, or let
the auto-flush threshold handle it.
Sourcepub async fn kv_put_with_ttl(
&self,
collection: &str,
key: &str,
value: &[u8],
ttl_ms: u64,
) -> NodeDbResult<()>
pub async fn kv_put_with_ttl( &self, collection: &str, key: &str, value: &[u8], ttl_ms: u64, ) -> NodeDbResult<()>
KV PUT WITH TTL: store a key-value pair that expires after ttl_ms ms.
After ttl_ms milliseconds, kv_get will return None for this key
and lazy-delete it. The deadline survives a database reopen.
Sourcepub async fn kv_get(
&self,
collection: &str,
key: &str,
) -> NodeDbResult<Option<Vec<u8>>>
pub async fn kv_get( &self, collection: &str, key: &str, ) -> NodeDbResult<Option<Vec<u8>>>
KV GET: retrieve a value by key.
Returns None for missing or expired keys. Expired keys are lazily
deleted from storage on read.
Checks the in-memory write buffer first (for uncommitted writes), then falls through to the KV store.
Sourcepub async fn kv_delete(&self, collection: &str, key: &str) -> NodeDbResult<bool>
pub async fn kv_delete(&self, collection: &str, key: &str) -> NodeDbResult<bool>
KV DELETE: remove a key.
Returns true when a live value was present and removed, false when
the key was absent (or already expired) — mirroring HashMap::remove.
The delete is recorded for sync even when the key is absent here, because Origin can hold the key when this replica does not.
Sourcepub async fn kv_flush(&self) -> NodeDbResult<usize>
pub async fn kv_flush(&self) -> NodeDbResult<usize>
Flush buffered KV writes to storage as a single transaction. Returns the number of writes flushed.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn kv_range_scan(
&self,
collection: &str,
start: Option<&[u8]>,
end: Option<&[u8]>,
limit: Option<usize>,
) -> NodeDbResult<Vec<(Vec<u8>, Vec<u8>)>>
pub async fn kv_range_scan( &self, collection: &str, start: Option<&[u8]>, end: Option<&[u8]>, limit: Option<usize>, ) -> NodeDbResult<Vec<(Vec<u8>, Vec<u8>)>>
KV RANGE SCAN: ordered key scan with optional bounds and limit.
Returns (key, value) pairs where start <= key < end, ordered by
key in lexicographic byte order. Expired keys are skipped and lazily
deleted.
start = Nonemeans scan from the beginning of the collection.end = Nonemeans scan to the end of the collection.limit = Nonemeans no cap on results.
Flushes the write buffer before scanning so the KV store reflects all pending writes.
Sourcepub async fn kv_compact_expired(&self, collection: &str) -> NodeDbResult<usize>
pub async fn kv_compact_expired(&self, collection: &str) -> NodeDbResult<usize>
KV COMPACT EXPIRED: eagerly remove all expired keys in a collection.
Flushes the write buffer, then scans all keys in the collection and deletes any whose TTL deadline has passed. Returns the count of keys removed.
Sourcepub async fn kv_scan(
&self,
collection: &str,
cursor: &str,
count: usize,
) -> NodeDbResult<Vec<(String, Vec<u8>)>>
pub async fn kv_scan( &self, collection: &str, cursor: &str, count: usize, ) -> NodeDbResult<Vec<(String, Vec<u8>)>>
KV SCAN: iterate keys in sorted order starting from cursor.
Returns up to count key-value pairs where key >= cursor (inclusive).
Pass an empty cursor to start from the beginning of the collection.
Flushes the write buffer first to ensure the KV store has all data, then uses the storage’s B-tree range scan — O(log N + count).
Sourcepub async fn kv_keys(&self, collection: &str) -> NodeDbResult<Vec<String>>
pub async fn kv_keys(&self, collection: &str) -> NodeDbResult<Vec<String>>
List all keys in a KV collection.
Sourcepub async fn kv_subscribe_shape(
&self,
collection: &str,
key_pattern: &str,
) -> NodeDbResult<Vec<String>>
pub async fn kv_subscribe_shape( &self, collection: &str, key_pattern: &str, ) -> NodeDbResult<Vec<String>>
Subscribe to a subset of KV keys matching a pattern.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn kv_increment(
&self,
collection: &str,
key: &str,
delta: i64,
) -> NodeDbResult<i64>
pub async fn kv_increment( &self, collection: &str, key: &str, delta: i64, ) -> NodeDbResult<i64>
KV INCREMENT: add delta to the counter at key and return the new
value.
The counter follows the rules the SQL INCR follows:
- a raw value is decimal text in and decimal text out;
- a typed row moves its first integer column in key order;
- an absent or expired key starts at 0 and stores decimal text;
- the key keeps its expiry.
A value that is not a counter, or a sum outside i64, is an error
and writes nothing. The new value syncs to Origin like any put.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn transaction(&self, ops: &[TransactionOp]) -> NodeDbResult<u64>
pub fn transaction(&self, ops: &[TransactionOp]) -> NodeDbResult<u64>
Execute a batch of operations atomically.
Atomicity model: all operations are validated upfront. If any
validation fails, none are applied. Once validation passes, all
operations are applied under a single CRDT lock hold. Each row still
exports its own delta (see CrdtEngine::batch_upsert) — a delta
spanning rows or collections is not independently applicable by the
receiver.
This is NOT ACID rollback — Loro doesn’t support undo. Instead, we validate-then-apply: no partial commits are possible because we only start writing after all checks pass.
Returns the number of operations applied.
Sourcepub fn set_conflict_policy(&self, collection: &str, policy: CollectionPolicy)
pub fn set_conflict_policy(&self, collection: &str, policy: CollectionPolicy)
Set conflict resolution policy for a collection.
Policies are evaluated on sync when Origin rejects a delta.
Available policies from nodedb-crdt::PolicyRegistry:
- LastWriterWins (default)
- RenameSuffix
- CascadeDefer
- EscalateToDlq
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn start_auto_compact(self: &Arc<Self>, interval_ms: u64)
pub fn start_auto_compact(self: &Arc<Self>, interval_ms: u64)
Start a background task that calls the global compact() every
interval_ms milliseconds, reclaiming dead pages and truncating the
backing file so on-disk growth stays bounded.
§When to use
Compaction is opt-in and unnecessary for most workloads. Enable it when writing one commit per entry, where the pagedb deferred-free list would otherwise accumulate and the file would grow without bound. For engines with nothing to compact (in-memory / test stores) the call is a cheap no-op every tick.
§Cost vs. auto-flush
This is heavier than start_auto_flush: compaction repacks the B+ trees
and truncates the file, and it no-ops while a reader pins the reclaimable
page range. Use a much larger interval than the flush interval — minutes,
not seconds.
§Usage
The open* constructors already start this task from
LiteConfig::auto_compact_ms,
which defaults to 0 (disabled). Set that field to enable compaction:
let config = LiteConfig { auto_compact_ms: 300_000, ..LiteConfig::default() };
let db = NodeDbLite::open_with_config(storage, config).await?;Calling this directly spawns an additional task rather than replacing a running one.
§Task lifecycle
The task is registered with the database’s task registry, so
NodeDbLite::shutdown stops it before
the host drops its async runtime. It also holds a Weak reference, so
a database dropped without a shutdown still ends the loop at its next
tick rather than keeping the database alive.
§Disabling
Pass interval_ms = 0 to skip spawning entirely (auto-compaction
disabled — the default). Compaction can still be triggered manually via
compact().
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn start_auto_flush(self: &Arc<Self>, interval_ms: u64)
pub fn start_auto_flush(self: &Arc<Self>, interval_ms: u64)
Start a background task that calls the global flush() every
interval_ms milliseconds, bounding the data-loss window uniformly
across all engines (KV buffer, vector id-map, CRDT deltas, CSR graph,
spatial, FTS).
§Durability contract
await-ing a write operation (e.g. kv_put, vector_insert) returning
Ok does NOT guarantee on-disk durability. Durability is bounded by
interval_ms. For guaranteed durability, call flush() explicitly after
writes.
§Usage
The open* constructors already start this task from
LiteConfig::auto_flush_ms,
so calling it is only needed to change the interval afterwards:
let db = NodeDbLite::open(storage).await?;
db.start_auto_flush(5_000); // slow the flusher down to five secondsEach call spawns an additional task rather than replacing the running
one, so opening with auto_flush_ms: 0 is the way to take full manual
control of when flushes happen.
§Task lifecycle
The task is registered with the database’s task registry, so
NodeDbLite::shutdown stops it before
the host drops its async runtime. It also holds a Weak reference, so
a database dropped without a shutdown still ends the loop at its next
tick rather than keeping the database alive.
§Disabling
Pass interval_ms = 0 to skip spawning entirely (auto-flush disabled).
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn crdt_snapshot_export_count(&self) -> u64
pub fn crdt_snapshot_export_count(&self) -> u64
Number of full CRDT snapshot exports performed since this handle was opened.
A snapshot export costs O(document), so this is the term that decides both flush latency and how much the file grows per tick. It is a counter, not a timing, so a caller can assert on it directly: an idle store must not advance it.
Sourcepub fn crdt_delta_write_count(&self) -> u64
pub fn crdt_delta_write_count(&self) -> u64
Number of unsent-delta queue entries written since this handle was opened.
The queue is append-only, so this advances by what was added, not by the queue’s length. An idle store must not advance it at all.
Sourcepub async fn flush(&self) -> NodeDbResult<()>
pub async fn flush(&self) -> NodeDbResult<()>
Persist all in-memory state to storage (call before shutdown).
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn open(storage: S) -> NodeDbResult<Arc<Self>>
pub async fn open(storage: S) -> NodeDbResult<Arc<Self>>
Open or create a Lite database backed by the given storage engine.
Configuration is resolved from environment variables via
LiteConfig::from_env(), falling back to defaults when variables are
absent or malformed. The default auto-flush interval is one second.
The timer schedules flushes without a hard completion deadline.
The instance’s Loro peer id is not a parameter: it is minted on first open and persisted with the data it authors. A caller-supplied id is the same constant in every install of an application, which hands two live replicas one producer identity and has the CRDT merge discard one of them; and an id that lives only in the caller’s argument cannot be rotated durably when Origin refuses it.
Sourcepub async fn open_with_config(
storage: S,
config: LiteConfig,
) -> NodeDbResult<Arc<Self>>
pub async fn open_with_config( storage: S, config: LiteConfig, ) -> NodeDbResult<Arc<Self>>
Open with an explicit LiteConfig.
This is the primary constructor for callers that need control over memory budgets or the background maintenance intervals. The config is validated before any storage work happens, so an incoherent budget is rejected rather than silently over-allocating.
Sourcepub async fn open_with_budget(
storage: S,
memory_budget: usize,
) -> NodeDbResult<Arc<Self>>
pub async fn open_with_budget( storage: S, memory_budget: usize, ) -> NodeDbResult<Arc<Self>>
Open with a custom memory budget, taking every other setting from
LiteConfig::default() — including the default auto-flush interval.
Prefer open_with_config for new callers.
Source§impl NodeDbLite<PagedbStorageDefault>
impl NodeDbLite<PagedbStorageDefault>
Sourcepub async fn open_at_path(
path: impl AsRef<Path>,
encryption: Encryption,
) -> NodeDbResult<Arc<Self>>
pub async fn open_at_path( path: impl AsRef<Path>, encryption: Encryption, ) -> NodeDbResult<Arc<Self>>
Open (or create) a Lite database at path.
A store that cannot be read is reported and left untouched — the
FailClosed default. Use
open_at_path_with_config with
corruption_policy set to choose otherwise.
Sourcepub async fn open_at_path_with_config(
path: impl AsRef<Path>,
encryption: Encryption,
config: LiteConfig,
) -> NodeDbResult<Arc<Self>>
pub async fn open_at_path_with_config( path: impl AsRef<Path>, encryption: Encryption, config: LiteConfig, ) -> NodeDbResult<Arc<Self>>
Like open_at_path, but with an explicit
LiteConfig.
config.corruption_policy governs both corruption points. Under
DiscardStoreAndRecreate a post-open corruption
renames the store aside and retries the open exactly once; the retry is
unguarded, so a second corruption surfaces to the caller rather than
looping.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn set_sync_gate(&self, gate: Arc<dyn SyncGate>)
pub fn set_sync_gate(&self, gate: Arc<dyn SyncGate>)
Install a per-document SyncGate. Documents the gate rejects are kept
local-only (excluded from CRDT delta, FTS, and vector sync channels).
Sourcepub fn pending_crdt_deltas(&self) -> NodeDbResult<Vec<PendingDelta>>
pub fn pending_crdt_deltas(&self) -> NodeDbResult<Vec<PendingDelta>>
Access pending CRDT deltas (for sync client).
Sourcepub fn acknowledge_deltas(&self, acked_id: u64) -> NodeDbResult<()>
pub fn acknowledge_deltas(&self, acked_id: u64) -> NodeDbResult<()>
Acknowledge synced deltas (called after Origin ACK).
Sourcepub fn set_crdt_pending_delta_seq(
&self,
mutation_id: u64,
seq: u64,
) -> NodeDbResult<()>
pub fn set_crdt_pending_delta_seq( &self, mutation_id: u64, seq: u64, ) -> NodeDbResult<()>
Assign a stable stream seq to a pending CRDT delta (first-send only).
No-op if the delta already has a non-zero seq. Called by the sync transport to ensure the same seq is reused on reconnect re-sends.
Sourcepub fn import_remote_deltas(
&self,
collection: &str,
data: &[u8],
) -> NodeDbResult<()>
pub fn import_remote_deltas( &self, collection: &str, data: &[u8], ) -> NodeDbResult<()>
Import remote deltas from Origin into collection’s Loro document.
The collection must be supplied by the caller: each collection has its own document, and the update bytes alone do not identify which one.
Sourcepub async fn apply_remote_row(
&self,
collection: &str,
document_id: &str,
payload: &[u8],
delete: bool,
) -> NodeDbResult<()>
pub async fn apply_remote_row( &self, collection: &str, document_id: &str, payload: &[u8], delete: bool, ) -> NodeDbResult<()>
Apply a server-originated row post-image from Origin.
Unlike Self::import_remote_deltas, the payload here is a
MessagePack row image rather than Loro update bytes. Origin sends it
for writes that have no client-authored CRDT operation to replicate
(SQL DML, DDL-managed system rows). An empty payload with delete set
removes the row.
A KV collection’s row is the {key, value…} row every KV read
returns. It lands in the KV store as the body a local write of the
same row stores. Any other collection’s row lands in its Loro
document.
Neither write reaches the outbound queue: the write came FROM Origin, so pushing it back would echo it into a loop.
Sourcepub fn reject_delta(&self, mutation_id: u64) -> NodeDbResult<()>
pub fn reject_delta(&self, mutation_id: u64) -> NodeDbResult<()>
Reject a specific delta (rollback optimistic local state).
Sourcepub fn start_sync(
self: &Arc<Self>,
config: SyncConfig,
) -> Option<Arc<SyncClient>>
pub fn start_sync( self: &Arc<Self>, config: SyncConfig, ) -> Option<Arc<SyncClient>>
Start background sync to Origin.
Spawns a task that connects to the Origin WebSocket endpoint, pushes pending deltas, and receives shape updates, reconnecting on its own.
Returns immediately — the sync runs in the background. Returns None
when sync is already running on this database: a second loop would
push the same deltas twice, and the first would no longer be the one
stop_sync stops.
The task is registered with the database, so stop_sync and
shutdown both stop it.
Requires the sync feature.
Sourcepub async fn stop_sync(&self) -> bool
pub async fn stop_sync(&self) -> bool
Stop background sync, leaving the database open and usable.
Returns true when sync was running. Sync can be restarted afterwards
with a fresh start_sync — the reconnect-with-a-
new-token path.
Requires the sync feature.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn strict_insert(
&self,
collection: &str,
values: &[Value],
) -> NodeDbResult<()>
pub async fn strict_insert( &self, collection: &str, values: &[Value], ) -> NodeDbResult<()>
Insert a row into a strict collection and update secondary indexes.
Combines StrictEngine.insert() with index_row() for geometry,
vector, and text columns.
Sourcepub async fn strict_delete(
&self,
collection: &str,
pk: &Value,
) -> NodeDbResult<bool>
pub async fn strict_delete( &self, collection: &str, pk: &Value, ) -> NodeDbResult<bool>
Delete a row from a strict collection and clean up text indexes.
Sourcepub async fn columnar_insert(
&self,
collection: &str,
values: &[Value],
) -> NodeDbResult<()>
pub async fn columnar_insert( &self, collection: &str, values: &[Value], ) -> NodeDbResult<()>
Insert a row into a columnar collection and update secondary indexes.
Sourcepub async fn strict_crdt_patch(
&self,
collection: &str,
pk: &Value,
field_updates: &HashMap<String, Value>,
) -> NodeDbResult<()>
pub async fn strict_crdt_patch( &self, collection: &str, pk: &Value, field_updates: &HashMap<String, Value>, ) -> NodeDbResult<()>
Apply a CRDT field-level update to a strict collection row.
Used during sync: a remote delta specifies field changes for a row. This reads the current tuple, patches the fields, and writes back.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn update_memory_stats(&self)
pub fn update_memory_stats(&self)
Update memory governor with current engine usage.
Sourcepub fn loaded_collections(&self) -> NodeDbResult<Vec<String>>
pub fn loaded_collections(&self) -> NodeDbResult<Vec<String>>
List currently loaded HNSW collections.
Sourcepub fn governor(&self) -> &Arc<MemoryGovernor> ⓘ
pub fn governor(&self) -> &Arc<MemoryGovernor> ⓘ
Access the memory governor.
Sourcepub fn sequences(&self) -> &Arc<LiteSequenceRegistry> ⓘ
pub fn sequences(&self) -> &Arc<LiteSequenceRegistry> ⓘ
Access the sequence registry that nextval / currval / setval
in a SELECT list read. Register a LiteSequenceDef here before
querying it.
Sourcepub fn strict_engine(&self) -> &Arc<StrictEngine<S>> ⓘ
pub fn strict_engine(&self) -> &Arc<StrictEngine<S>> ⓘ
Access the strict document engine (for direct Binary Tuple CRUD).
Sourcepub fn columnar_engine(&self) -> &Arc<ColumnarEngine<S>> ⓘ
pub fn columnar_engine(&self) -> &Arc<ColumnarEngine<S>> ⓘ
Access the columnar analytics engine (for direct segment operations).
Sourcepub fn htap_bridge(&self) -> &Arc<HtapBridge> ⓘ
pub fn htap_bridge(&self) -> &Arc<HtapBridge> ⓘ
Access the HTAP bridge (for materialized view inspection).
Sourcepub fn timeseries_engine(&self) -> &Arc<Mutex<TimeseriesEngine>> ⓘ
pub fn timeseries_engine(&self) -> &Arc<Mutex<TimeseriesEngine>> ⓘ
Access the timeseries engine (continuous aggregates, ingest, flush).
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn rotate_peer_id(&self) -> NodeDbResult<u64>
pub async fn rotate_peer_id(&self) -> NodeDbResult<u64>
Adopt a new Loro peer id and re-author every document under it.
Called when Origin refuses a delta because its peer id belongs to another replica. Continuing under the refused id is not an option: the server refuses every subsequent write, and were it not to, the CRDT merge would discard them as replays of the owning replica’s operations.
The new id is persisted before the documents adopt it, so a crash mid-rotation cannot leave the store authoring under an id its own identity record no longer claims. The rebuilt documents are then flushed, because they exist only in memory until they are — and a restart that reloaded the pre-rotation snapshots would resurrect the operations the rotation exists to abandon.
Every row is queued for re-push: the rebuilt documents share no history with what Origin holds, so the rotation is a resync, not a resume.
Sourcepub async fn regenerate_identity(&self) -> NodeDbResult<()>
pub async fn regenerate_identity(&self) -> NodeDbResult<()>
Replace the whole producer identity and re-author every document.
Called when Origin reports this instance as forked: the history it
holds under this lite_id diverged from the one here, so the instance
cannot resume the producer stream. A new lite_id and epoch make it a
distinct producer, and the peer id goes with them — keeping it would
collide with the history the fork was detected against, which is the
same refusal one step later.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn spatial_insert(
&self,
collection: &str,
field: &str,
doc_id: &str,
geometry: &Geometry,
)
pub fn spatial_insert( &self, collection: &str, field: &str, doc_id: &str, geometry: &Geometry, )
Index a geometry in a collection’s spatial index.
field identifies which geometry field is being indexed (allows a
collection to carry multiple spatial fields). If the document was
previously indexed under the same (collection, doc_id), the old entry
is replaced (upsert semantics).
Sourcepub fn spatial_delete(&self, collection: &str, field: &str, doc_id: &str)
pub fn spatial_delete(&self, collection: &str, field: &str, doc_id: &str)
Remove a document’s geometry from the spatial index.
Sourcepub fn spatial_search_bbox(
&self,
collection: &str,
field: &str,
query: &BoundingBox,
) -> Vec<RTreeEntry>
pub fn spatial_search_bbox( &self, collection: &str, field: &str, query: &BoundingBox, ) -> Vec<RTreeEntry>
Bounding-box range search: returns all doc entry IDs whose bbox intersects the query rectangle.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn shutdown(&self)
pub async fn shutdown(&self)
Stop every background task this database started, and wait for them.
Call this before dropping the async runtime the database was opened on. Auto-flush, auto-compact and the sync loop each outlive the call that started them; a runtime torn down while one is still polling takes the task down mid-poll, which on a native runtime has crashed the process.
Call it also before reopening the same store in-process. A background
flush in flight holds the database, and so the store, open past the
drop of the last handle, and the reopen fails with AlreadyOpen.
Each task is signalled first and leaves its loop at a point it chose.
One that ignores the signal past
TASK_STOP_TIMEOUT is aborted.
Admitted search DDL completes before this returns.
Idempotent, and safe on a database that started no tasks. It does not
flush: what is in memory at shutdown is still in memory, so call
flush first when the data must be durable.
Source§impl NodeDbLite<PagedbStorageDefault>
impl NodeDbLite<PagedbStorageDefault>
Sourcepub async fn snapshot_to(&self, path: impl AsRef<Path>) -> NodeDbResult<()>
pub async fn snapshot_to(&self, path: impl AsRef<Path>) -> NodeDbResult<()>
Flush pending state and export a native snapshot to a new directory.
Quiesce concurrent writes for one application-level point in time. PageDB pins its published state and blocks storage writes during export. This API is unavailable on WASM.
Sourcepub async fn restore_from(
source: impl AsRef<Path>,
destination: impl AsRef<Path>,
encryption: Encryption,
config: LiteConfig,
) -> NodeDbResult<Arc<Self>>
pub async fn restore_from( source: impl AsRef<Path>, destination: impl AsRef<Path>, encryption: Encryption, config: LiteConfig, ) -> NodeDbResult<Arc<Self>>
Restore a native snapshot into a new writable destination and retain Lite replica identity.
Supply the source encryption mode and KDF costs. Passphrase restores create a fresh destination salt. PageDB forks its storage identity through rekeying. Restore always uses fail-closed corruption handling. This API is unavailable on WASM.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn sparse_insert(
&self,
collection: &str,
field: &str,
doc_id: &str,
entries: &[(u32, f32)],
) -> NodeDbResult<()>
pub fn sparse_insert( &self, collection: &str, field: &str, doc_id: &str, entries: &[(u32, f32)], ) -> NodeDbResult<()>
Index a sparse vector under (collection, field).
entries are (dimension, weight) pairs; they are sorted, deduplicated
and validated by SparseVector. Re-indexing the same doc_id
replaces its postings rather than adding to them.
Sourcepub fn sparse_delete(&self, collection: &str, field: &str, doc_id: &str) -> bool
pub fn sparse_delete(&self, collection: &str, field: &str, doc_id: &str) -> bool
Remove a document from one (collection, field) sparse index.
Returns true when the document was indexed.
Sourcepub fn sparse_search(
&self,
collection: &str,
field: &str,
query_entries: &[(u32, f32)],
top_k: usize,
) -> NodeDbResult<Vec<(String, f32)>>
pub fn sparse_search( &self, collection: &str, field: &str, query_entries: &[(u32, f32)], top_k: usize, ) -> NodeDbResult<Vec<(String, f32)>>
Top-k documents in (collection, field) by sparse dot product.
Results are (doc_id, score) ordered by score descending, ties broken
by ascending doc_id. Documents sharing no dimension with the query
score zero and are excluded. A collection with no sparse index yields
no hits rather than an error.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn put_function(&self, func: &LiteStoredFunction) -> NodeDbResult<()>
pub async fn put_function(&self, func: &LiteStoredFunction) -> NodeDbResult<()>
Store a function definition in the local catalog.
Sourcepub async fn get_function(
&self,
name: &str,
) -> NodeDbResult<Option<LiteStoredFunction>>
pub async fn get_function( &self, name: &str, ) -> NodeDbResult<Option<LiteStoredFunction>>
Get a function definition by name.
Sourcepub async fn list_functions(&self) -> NodeDbResult<Vec<LiteStoredFunction>>
pub async fn list_functions(&self) -> NodeDbResult<Vec<LiteStoredFunction>>
List all function definitions.
Sourcepub async fn delete_function(&self, name: &str) -> NodeDbResult<()>
pub async fn delete_function(&self, name: &str) -> NodeDbResult<()>
Delete a function definition.
Sourcepub async fn put_trigger(&self, trigger: &LiteStoredTrigger) -> NodeDbResult<()>
pub async fn put_trigger(&self, trigger: &LiteStoredTrigger) -> NodeDbResult<()>
Store a trigger definition in the local catalog.
Sourcepub async fn get_trigger(
&self,
name: &str,
) -> NodeDbResult<Option<LiteStoredTrigger>>
pub async fn get_trigger( &self, name: &str, ) -> NodeDbResult<Option<LiteStoredTrigger>>
Get a trigger definition by name.
Sourcepub async fn list_triggers(&self) -> NodeDbResult<Vec<LiteStoredTrigger>>
pub async fn list_triggers(&self) -> NodeDbResult<Vec<LiteStoredTrigger>>
List all trigger definitions.
Sourcepub async fn list_triggers_for_collection(
&self,
collection: &str,
) -> NodeDbResult<Vec<LiteStoredTrigger>>
pub async fn list_triggers_for_collection( &self, collection: &str, ) -> NodeDbResult<Vec<LiteStoredTrigger>>
List triggers for a specific collection.
Sourcepub async fn delete_trigger(&self, name: &str) -> NodeDbResult<()>
pub async fn delete_trigger(&self, name: &str) -> NodeDbResult<()>
Delete a trigger definition.
Sourcepub async fn put_procedure(
&self,
proc: &LiteStoredProcedure,
) -> NodeDbResult<()>
pub async fn put_procedure( &self, proc: &LiteStoredProcedure, ) -> NodeDbResult<()>
Store a procedure definition in the local catalog.
Sourcepub async fn get_procedure(
&self,
name: &str,
) -> NodeDbResult<Option<LiteStoredProcedure>>
pub async fn get_procedure( &self, name: &str, ) -> NodeDbResult<Option<LiteStoredProcedure>>
Get a procedure definition by name.
Sourcepub async fn list_procedures(&self) -> NodeDbResult<Vec<LiteStoredProcedure>>
pub async fn list_procedures(&self) -> NodeDbResult<Vec<LiteStoredProcedure>>
List all procedure definitions.
Sourcepub async fn delete_procedure(&self, name: &str) -> NodeDbResult<()>
pub async fn delete_procedure(&self, name: &str) -> NodeDbResult<()>
Delete a procedure definition.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn diagnostic_dump(&self) -> DiagnosticDump
pub async fn diagnostic_dump(&self) -> DiagnosticDump
Generate a diagnostic dump suitable for bug reports.
Contains NO user data, NO document contents, NO embeddings. Safe to send to support channels.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn graph_rag_search(
&self,
params: &GraphRagParams<'_>,
) -> NodeDbResult<Vec<SearchResult>>
pub async fn graph_rag_search( &self, params: &GraphRagParams<'_>, ) -> NodeDbResult<Vec<SearchResult>>
Fuse vector retrieval with bounded, outgoing graph expansion.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn hybrid_search(
&self,
params: &HybridSearchParams<'_>,
) -> NodeDbResult<Vec<SearchResult>>
pub async fn hybrid_search( &self, params: &HybridSearchParams<'_>, ) -> NodeDbResult<Vec<SearchResult>>
Hybrid search: vector similarity + BM25 text relevance fused via RRF.
- Vector search returns
vector_kcandidates by embedding similarity. - Text search returns
text_kcandidates by BM25 relevance. - RRF fuses both rankings into a single score per document.
- Top
top_kresults returned.
Documents found by both searches get boosted (RRF scores are additive).
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub fn storage(&self) -> &S
pub fn storage(&self) -> &S
Borrow the underlying storage engine.
Public so benchmark code can call backend-specific methods like backend-specific methods (e.g. size reporting) for compression-ratio measurement.
Sourcepub async fn compact(&self) -> NodeDbResult<CompactionOutcome>
pub async fn compact(&self) -> NodeDbResult<CompactionOutcome>
Compact the backing storage engine, reclaiming dead pages and truncating the file to bound on-disk growth.
Forwards to StorageEngine::compact. For the pagedb-backed engine this
drains the deferred-free list and truncates main.db; for in-memory or
test engines it is a no-op returning a zero
CompactionOutcome.
Sourcepub fn health(&self) -> HealthStatus
pub fn health(&self) -> HealthStatus
Get a structured health report.
This is a cheap, non-blocking call — reads atomic counters and lock-free state. Safe to call frequently from health check endpoints.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn document_put_with_vector_batch_impl(
&self,
items: &[BatchItem<'_>],
) -> NodeDbResult<Vec<String>>
pub async fn document_put_with_vector_batch_impl( &self, items: &[BatchItem<'_>], ) -> NodeDbResult<Vec<String>>
Batch upsert of documents with optional embeddings.
Acquires the CRDT lock once and runs every per-item Loro mutation
under that single hold. Per CrdtEngine::batch_write, each CRDT row
still exports its own delta — one per document, plus one per item with
a non-empty embedding for the vector-metadata row — because a delta
covering several rows or collections is not independently applicable by
the receiver.
FTS indexing, bitemporal history, and HNSW inserts happen after the lock is released, in the same relative order as the single-item path.
Returns the list of document IDs written, in input order.
Source§impl<S: StorageEngine> NodeDbLite<S>
impl<S: StorageEngine> NodeDbLite<S>
Sourcepub async fn vector_delete_field(
&self,
collection: &str,
field_name: &str,
id: &str,
) -> NodeDbResult<()>
pub async fn vector_delete_field( &self, collection: &str, field_name: &str, id: &str, ) -> NodeDbResult<()>
Delete the named vector field_name of id in collection, keeping
the row’s document fields and any other vector attached to it. An
empty field_name names the base vector, as vector_delete does.
Trait Implementations§
Source§impl<S: StorageEngine> NodeDb for NodeDbLite<S>
impl<S: StorageEngine> NodeDb for NodeDbLite<S>
Source§fn batch_graph_insert_edges<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
collection: &'life1 str,
edges: &'life2 [(&'life3 str, &'life4 str, &'life5 str)],
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn batch_graph_insert_edges<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
collection: &'life1 str,
edges: &'life2 [(&'life3 str, &'life4 str, &'life5 str)],
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Overrides the trait’s default (which loops graph_insert_edge) with
the batched CSR-lock-once, single-CRDT-write path. edge_type and
properties are not part of this trait signature, so every edge is
inserted with no properties, matching what looping graph_insert_edge
with properties: None would have written.
Source§fn vector_search<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
query: &'life2 [f32],
k: usize,
filter: Option<&'life3 MetadataFilter>,
allowed_ids: Option<&'life4 HashSet<String>>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn vector_search<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
query: &'life2 [f32],
k: usize,
filter: Option<&'life3 MetadataFilter>,
allowed_ids: Option<&'life4 HashSet<String>>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn vector_insert<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
embedding: &'life3 [f32],
metadata: Option<Document>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn vector_insert<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
embedding: &'life3 [f32],
metadata: Option<Document>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
collection. Read moreSource§fn vector_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn vector_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
collection. Read moreSource§fn vector_insert_field<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
field_name: &'life2 str,
id: &'life3 str,
embedding: &'life4 [f32],
metadata: Option<Document>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn vector_insert_field<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
field_name: &'life2 str,
id: &'life3 str,
embedding: &'life4 [f32],
metadata: Option<Document>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn vector_search_field<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
field_name: &'life2 str,
query: &'life3 [f32],
k: usize,
filter: Option<&'life4 MetadataFilter>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn vector_search_field<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
field_name: &'life2 str,
query: &'life3 [f32],
k: usize,
filter: Option<&'life4 MetadataFilter>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
field_name. Read moreSource§fn graph_traverse<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
start: &'life2 NodeId,
depth: u8,
direction: Direction,
edge_filter: Option<&'life3 EdgeFilter>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<SubGraph>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn graph_traverse<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
start: &'life2 NodeId,
depth: u8,
direction: Direction,
edge_filter: Option<&'life3 EdgeFilter>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<SubGraph>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn graph_insert_edge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
from: &'life2 NodeId,
to: &'life3 NodeId,
edge_type: &'life4 str,
properties: Option<Document>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<EdgeId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn graph_insert_edge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
from: &'life2 NodeId,
to: &'life3 NodeId,
edge_type: &'life4 str,
properties: Option<Document>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<EdgeId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
from → to with label edge_type into
collection. Returns the generated edge ID. Read moreSource§fn graph_delete_edge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
edge_id: &'life2 EdgeId,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn graph_delete_edge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
edge_id: &'life2 EdgeId,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
collection. Read moreSource§fn graph_stats<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: Option<&'life1 str>,
as_of: Option<i64>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<GraphStats>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn graph_stats<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: Option<&'life1 str>,
as_of: Option<i64>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<GraphStats>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn graph_pagerank<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 str,
personalization: Option<HashMap<String, f64>>,
damping: Option<f64>,
max_iterations: Option<u32>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<(String, f64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn graph_pagerank<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 str,
personalization: Option<HashMap<String, f64>>,
damping: Option<f64>,
max_iterations: Option<u32>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<(String, f64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn graph_shortest_path<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
from: &'life2 NodeId,
to: &'life3 NodeId,
max_depth: u8,
edge_filter: Option<&'life4 EdgeFilter>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Option<Vec<NodeId>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn graph_shortest_path<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
from: &'life2 NodeId,
to: &'life3 NodeId,
max_depth: u8,
edge_filter: Option<&'life4 EdgeFilter>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Option<Vec<NodeId>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn list_insert<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
document_id: &'life2 str,
list_path: &'life3 str,
index: usize,
fields: &'life4 Value,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn list_insert<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
document_id: &'life2 str,
list_path: &'life3 str,
index: usize,
fields: &'life4 Value,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
index. Read moreSource§fn list_delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
document_id: &'life2 str,
list_path: &'life3 str,
index: usize,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
document_id: &'life2 str,
list_path: &'life3 str,
index: usize,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
index from a document’s movable list. Read moreSource§fn list_move<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
document_id: &'life2 str,
list_path: &'life3 str,
from_index: usize,
to_index: usize,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_move<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
collection: &'life1 str,
document_id: &'life2 str,
list_path: &'life3 str,
from_index: usize,
to_index: usize,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn document_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Option<Document>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn document_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Option<Document>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
collection. Read moreSource§fn document_put<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 str,
doc: Document,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn document_put<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 str,
doc: Document,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
collection. Read moreSource§fn document_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn document_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
collection. Read moreSource§fn document_put_with_vector<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
doc_collection: &'life1 str,
doc: Document,
vector_collection: &'life2 str,
id: &'life3 str,
embedding: &'life4 [f32],
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn document_put_with_vector<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
doc_collection: &'life1 str,
doc: Document,
vector_collection: &'life2 str,
id: &'life3 str,
embedding: &'life4 [f32],
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn document_get_as_of<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
as_of_ms: Option<i64>,
valid_time_ms: Option<i64>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Option<Document>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn document_get_as_of<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
collection: &'life1 str,
id: &'life2 str,
as_of_ms: Option<i64>,
valid_time_ms: Option<i64>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Option<Document>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn document_put_with_valid_time<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 str,
doc: Document,
valid_from_ms: Option<i64>,
valid_until_ms: Option<i64>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn document_put_with_valid_time<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 str,
doc: Document,
valid_from_ms: Option<i64>,
valid_until_ms: Option<i64>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn execute_sql<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
params: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = NodeDbResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_sql<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
params: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = NodeDbResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn text_search<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
field: &'life2 str,
query: &'life3 str,
top_k: usize,
params: TextSearchParams,
allowed_ids: Option<&'life4 HashSet<String>>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn text_search<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
field: &'life2 str,
query: &'life3 str,
top_k: usize,
params: TextSearchParams,
allowed_ids: Option<&'life4 HashSet<String>>,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn list_dropped_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<DroppedCollection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_dropped_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NodeDbResult<Vec<DroppedCollection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn batch_vector_insert<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
vectors: &'life2 [(&'life3 str, &'life4 [f32])],
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: Sync + 'async_trait,
fn batch_vector_insert<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
collection: &'life1 str,
vectors: &'life2 [(&'life3 str, &'life4 [f32])],
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: Sync + 'async_trait,
Source§fn proto_version(&self) -> u16
fn proto_version(&self) -> u16
0 for an implementation that performs no handshake.Source§fn capabilities(&self) -> u64
fn capabilities(&self) -> u64
0 when no
handshake ran. Capabilities::from_raw gives named predicates.Source§fn server_version(&self) -> String
fn server_version(&self) -> String
HelloAckFrame (e.g. "0.1.0-dev").
Empty when no handshake ran.Source§fn limits(&self) -> Limits
fn limits(&self) -> Limits
None
when no handshake ran. None means no server-side cap.Source§fn undrop_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn undrop_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Source§fn drop_collection_purge<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn drop_collection_purge<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Source§fn on_collection_purged<'life0, 'async_trait>(
&'life0 self,
_handler: Arc<dyn Fn(CollectionPurgedEvent) + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn on_collection_purged<'life0, 'async_trait>(
&'life0 self,
_handler: Arc<dyn Fn(CollectionPurgedEvent) + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Source§impl<S: StorageEngine> SyncDelegate for NodeDbLite<S>
impl<S: StorageEngine> SyncDelegate for NodeDbLite<S>
Source§fn sync_identity(&self) -> LiteIdentity
fn sync_identity(&self) -> LiteIdentity
lite_id, epoch, and the Loro peer
id local operations are authored under. Read moreSource§fn regenerate_identity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn regenerate_identity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn rotate_peer_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rotate_peer_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_deltas(&self) -> Vec<PendingDelta>
fn pending_deltas(&self) -> Vec<PendingDelta>
Source§fn set_pending_delta_seq<'life0, 'async_trait>(
&'life0 self,
mutation_id: u64,
seq: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_pending_delta_seq<'life0, 'async_trait>(
&'life0 self,
mutation_id: u64,
seq: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge(&self, mutation_id: u64)
fn acknowledge(&self, mutation_id: u64)
Source§fn reject_with_policy(&self, mutation_id: u64, hint: &CompensationHint)
fn reject_with_policy(&self, mutation_id: u64, hint: &CompensationHint)
Source§fn import_remote(&self, collection: &str, data: &[u8])
fn import_remote(&self, collection: &str, data: &[u8])
collection’s local CRDT state. Read moreSource§fn apply_remote_row<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 RowPushMsg,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply_remote_row<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 RowPushMsg,
) -> Pin<Box<dyn Future<Output = Result<(), NodeDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
0x15). Read moreSource§fn handle_array_delta<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArrayDeltaMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayAckMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_array_delta<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArrayDeltaMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayAckMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ArrayDelta frame from Origin. Read moreSource§fn handle_array_delta_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArrayDeltaBatchMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayAckMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_array_delta_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArrayDeltaBatchMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayAckMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ArrayDelta frames from Origin. Read moreSource§fn handle_array_reject<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArrayRejectMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayCatchupRequestMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_array_reject<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArrayRejectMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayCatchupRequestMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ArrayReject from Origin. Read moreSource§fn handle_array_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArraySnapshotMsg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_array_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArraySnapshotMsg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ArraySnapshot header from Origin. Errors are logged.Source§fn handle_array_snapshot_chunk<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArraySnapshotChunkMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayAckMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_array_snapshot_chunk<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 ArraySnapshotChunkMsg,
) -> Pin<Box<dyn Future<Output = Option<ArrayAckMsg>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ArraySnapshotChunk from Origin. Read moreSource§fn begin_array_catchup(&self) -> Vec<ArrayCatchupRequestMsg>
fn begin_array_catchup(&self) -> Vec<ArrayCatchupRequestMsg>
Source§fn pending_array_ops<'life0, 'async_trait>(
&'life0 self,
after: Option<Hlc>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingArrayOp>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_array_ops<'life0, 'async_trait>(
&'life0 self,
after: Option<Hlc>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingArrayOp>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
limit queued local array ops with an HLC strictly greater than
after, in HLC order. None starts at the head of the queue.Source§fn persist_array_op_seq<'life0, 'life1, 'async_trait>(
&'life0 self,
op: &'life1 PendingArrayOp,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn persist_array_op_seq<'life0, 'life1, 'async_trait>(
&'life0 self,
op: &'life1 PendingArrayOp,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
op.seq into the queued op before its first send. Read moreSource§fn retire_array_ops<'life0, 'life1, 'async_trait>(
&'life0 self,
hlcs: &'life1 [Hlc],
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retire_array_ops<'life0, 'life1, 'async_trait>(
&'life0 self,
hlcs: &'life1 [Hlc],
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
hlcs: ops Origin applied, and
ops the push loop cannot encode. Ops no longer queued are skipped.Source§fn array_schema_announce(
&self,
array: &str,
) -> Result<Option<ArraySchemaSyncMsg>, LiteError>
fn array_schema_announce( &self, array: &str, ) -> Result<Option<ArraySchemaSyncMsg>, LiteError>
ArraySchema body announcing array’s current schema to Origin:
the schema HLC and Loro snapshot, read together. Returns None when
array has no local schema.Source§fn pending_columnar_batches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingColumnarBatch)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_columnar_batches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingColumnarBatch)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending batches from durable storage,
skipping any currently in-flight entries. Read moreSource§fn mark_columnar_batch_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_columnar_batch_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_columnar_batch_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_columnar_batch_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge_columnar_batch<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_columnar_batch<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_vector_inserts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingVectorInsert)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_vector_inserts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingVectorInsert)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending insert entries, skipping in-flight.Source§fn mark_vector_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_vector_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_vector_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_vector_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge_vector_insert<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_vector_insert<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_vector_deletes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingVectorDelete)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_vector_deletes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingVectorDelete)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending delete entries, skipping in-flight.Source§fn mark_vector_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_vector_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_vector_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_vector_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge_vector_delete<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_vector_delete<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_fts_indexes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, PendingFtsIndex)>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_fts_indexes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, PendingFtsIndex)>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending index entries, skipping in-flight.Source§fn mark_fts_index_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_fts_index_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_fts_index_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_fts_index_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge_fts_index<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_fts_index<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_fts_deletes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, PendingFtsDelete)>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_fts_deletes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, PendingFtsDelete)>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending FTS delete entries, skipping in-flight.Source§fn mark_fts_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_fts_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_fts_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_fts_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge_fts_delete<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_fts_delete<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_spatial_inserts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingSpatialInsert)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_spatial_inserts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingSpatialInsert)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending insert entries, skipping in-flight.Source§fn mark_spatial_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_spatial_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_spatial_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_spatial_insert_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge_spatial_insert<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_spatial_insert<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_spatial_deletes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingSpatialDelete)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_spatial_deletes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingSpatialDelete)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending spatial delete entries, skipping in-flight.Source§fn mark_spatial_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_spatial_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_spatial_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_spatial_delete_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn acknowledge_spatial_delete<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_spatial_delete<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_timeseries_batches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingTimeseriesBatch)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_timeseries_batches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<(Vec<u8>, PendingTimeseriesBatch)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending batches, skipping in-flight entries.Source§fn mark_timeseries_batch_in_flight<'life0, 'async_trait>(
&'life0 self,
stream_seq: u64,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_timeseries_batch_in_flight<'life0, 'async_trait>(
&'life0 self,
stream_seq: u64,
batch_id: u64,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ack_timeseries_batches_through_seq<'life0, 'async_trait>(
&'life0 self,
applied_seq: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_timeseries_batches_through_seq<'life0, 'async_trait>(
&'life0 self,
applied_seq: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
applied_seq.Source§fn ack_timeseries_batch_by_id<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ack_timeseries_batch_by_id<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
batch_id. Read moreSource§fn acknowledge_timeseries_batch<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acknowledge_timeseries_batch<'life0, 'async_trait>(
&'life0 self,
durable_key: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pending_kv_writes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, PendingKvWrite)>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_kv_writes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, PendingKvWrite)>, LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
PUSH_DRAIN_LIMIT pending KV writes in queue order, skipping
the ones in flight. Returns (durable_key, write) pairs.Source§fn persist_kv_write_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
write: &'life2 PendingKvWrite,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_kv_write_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
write: &'life2 PendingKvWrite,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key. Read moreSource§fn mark_kv_write_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_kv_write_in_flight<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
batch_id was sent and awaits its ack.Source§fn retire_kv_write<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn retire_kv_write<'life0, 'async_trait>(
&'life0 self,
batch_id: u64,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
batch_id after Origin’s final answer:
forget it is in flight and delete its durable entry.Source§fn clear_engine_in_flight<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_engine_in_flight<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn next_stream_seq<'life0, 'async_trait>(
&'life0 self,
stream_id: u64,
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_stream_seq<'life0, 'async_trait>(
&'life0 self,
stream_id: u64,
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
stream_id. Read moreSource§fn record_stream_ack<'life0, 'async_trait>(
&'life0 self,
stream_id: u64,
applied_seq: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_stream_ack<'life0, 'async_trait>(
&'life0 self,
stream_id: u64,
applied_seq: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn persist_producer_state<'life0, 'async_trait>(
&'life0 self,
producer_id: u64,
accepted_epoch: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn persist_producer_state<'life0, 'async_trait>(
&'life0 self,
producer_id: u64,
accepted_epoch: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
producer_id and accepted_epoch
so they survive process restart and can be reloaded on reconnect. Read moreSource§fn load_producer_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = (u64, u64)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_producer_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = (u64, u64)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn import_definition<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 DefinitionSyncMsg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn import_definition<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 DefinitionSyncMsg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
spawn_blocking.Source§fn import_collection_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 CollectionSchemaSyncMsg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn import_collection_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 CollectionSchemaSyncMsg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
0x13). Read moreSource§fn get_collection_meta<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<CollectionMeta>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_collection_meta<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<CollectionMeta>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
CollectionSchema (opcode 0x13) announce sent before a
collection’s first CRDT delta in a sync session. Read moreSource§fn persist_columnar_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
batch: &'life2 PendingColumnarBatch,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_columnar_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
batch: &'life2 PendingColumnarBatch,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key. Read moreSource§fn persist_timeseries_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
batch: &'life2 PendingTimeseriesBatch,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_timeseries_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
batch: &'life2 PendingTimeseriesBatch,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key.Source§fn persist_vector_insert_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
insert: &'life2 PendingVectorInsert,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_vector_insert_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
insert: &'life2 PendingVectorInsert,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key.Source§fn persist_vector_delete_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
delete: &'life2 PendingVectorDelete,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_vector_delete_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
delete: &'life2 PendingVectorDelete,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key.Source§fn persist_fts_index_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
entry: &'life2 PendingFtsIndex,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_fts_index_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
entry: &'life2 PendingFtsIndex,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key.Source§fn persist_fts_delete_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
entry: &'life2 PendingFtsDelete,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_fts_delete_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
entry: &'life2 PendingFtsDelete,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key.Source§fn persist_spatial_insert_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
insert: &'life2 PendingSpatialInsert,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_spatial_insert_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
insert: &'life2 PendingSpatialInsert,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key.Source§fn persist_spatial_delete_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
delete: &'life2 PendingSpatialDelete,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_spatial_delete_seq<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
delete: &'life2 PendingSpatialDelete,
) -> Pin<Box<dyn Future<Output = Result<(), LiteError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
key.Auto Trait Implementations§
impl<S> !Freeze for NodeDbLite<S>
impl<S> !RefUnwindSafe for NodeDbLite<S>
impl<S> !UnwindSafe for NodeDbLite<S>
impl<S> Send for NodeDbLite<S>where
Arc<S>: Send,
Arc<VectorState<S>>: Send,
LiteQueryEngine<S>: Send,
Arc<StrictEngine<S>>: Send,
Arc<ColumnarEngine<S>>: Send,
Arc<SchemaRegistry<S>>: Send,
Arc<ArrayOutbound<S>>: Send,
Arc<ArrayInbound<S>>: Send,
Arc<StreamSeqTracker<S>>: Send,
Option<Arc<ColumnarOutbound<S>>>: Send,
Option<Arc<VectorOutbound<S>>>: Send,
Option<Arc<FtsOutbound<S>>>: Send,
Option<Arc<SpatialOutbound<S>>>: Send,
Option<Arc<TimeseriesOutbound<S>>>: Send,
Option<Arc<KvOutbound<S>>>: Send,
impl<S> Sync for NodeDbLite<S>where
Arc<S>: Sync,
Arc<VectorState<S>>: Sync,
LiteQueryEngine<S>: Sync,
Arc<StrictEngine<S>>: Sync,
Arc<ColumnarEngine<S>>: Sync,
Arc<SchemaRegistry<S>>: Sync,
Arc<ArrayOutbound<S>>: Sync,
Arc<ArrayInbound<S>>: Sync,
Arc<StreamSeqTracker<S>>: Sync,
Option<Arc<ColumnarOutbound<S>>>: Sync,
Option<Arc<VectorOutbound<S>>>: Sync,
Option<Arc<FtsOutbound<S>>>: Sync,
Option<Arc<SpatialOutbound<S>>>: Sync,
Option<Arc<TimeseriesOutbound<S>>>: Sync,
Option<Arc<KvOutbound<S>>>: Sync,
impl<S> Unpin for NodeDbLite<S>where
Arc<S>: Unpin,
Arc<VectorState<S>>: Unpin,
LiteQueryEngine<S>: Unpin,
Arc<StrictEngine<S>>: Unpin,
Arc<ColumnarEngine<S>>: Unpin,
Arc<SchemaRegistry<S>>: Unpin,
Arc<ArrayOutbound<S>>: Unpin,
Arc<ArrayInbound<S>>: Unpin,
Arc<StreamSeqTracker<S>>: Unpin,
Option<Arc<ColumnarOutbound<S>>>: Unpin,
Option<Arc<VectorOutbound<S>>>: Unpin,
Option<Arc<FtsOutbound<S>>>: Unpin,
Option<Arc<SpatialOutbound<S>>>: Unpin,
Option<Arc<TimeseriesOutbound<S>>>: Unpin,
Option<Arc<KvOutbound<S>>>: Unpin,
impl<S> UnsafeUnpin for NodeDbLite<S>where
Arc<S>: UnsafeUnpin,
Arc<VectorState<S>>: UnsafeUnpin,
LiteQueryEngine<S>: UnsafeUnpin,
Arc<StrictEngine<S>>: UnsafeUnpin,
Arc<ColumnarEngine<S>>: UnsafeUnpin,
Arc<SchemaRegistry<S>>: UnsafeUnpin,
Arc<ArrayOutbound<S>>: UnsafeUnpin,
Arc<ArrayInbound<S>>: UnsafeUnpin,
Arc<StreamSeqTracker<S>>: UnsafeUnpin,
Option<Arc<ColumnarOutbound<S>>>: UnsafeUnpin,
Option<Arc<VectorOutbound<S>>>: UnsafeUnpin,
Option<Arc<FtsOutbound<S>>>: UnsafeUnpin,
Option<Arc<SpatialOutbound<S>>>: UnsafeUnpin,
Option<Arc<TimeseriesOutbound<S>>>: UnsafeUnpin,
Option<Arc<KvOutbound<S>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.impl<T> NodeDbMarker for T
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.