MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / partition

Method partition

nodedb-graph/src/sharded.rs:66–68  ·  view source on GitHub ↗

Shared access to a tenant's partition, if it exists. Returns `None` if the tenant has never inserted any graph data. Callers expecting a read-only view of a possibly-empty partition should treat `None` as "empty" rather than as an error.

(&self, tid: TenantId)

Source from the content-addressed store, hash-verified

64 /// Callers expecting a read-only view of a possibly-empty partition
65 /// should treat `None` as "empty" rather than as an error.
66 pub fn partition(&self, tid: TenantId) -> Option<&CsrIndex> {
67 self.partitions.get(&tid)
68 }
69
70 /// Mutable access to a tenant's partition, if it exists.
71 pub fn partition_mut(&mut self, tid: TenantId) -> Option<&mut CsrIndex> {

Calls 1

getMethod · 0.45