Skip to main content

CsrShardSet

Struct CsrShardSet 

Source
pub struct CsrShardSet { /* private fields */ }
Expand description

Sharded topology container for one edge direction.

Routes every row-addressed operation to the group owning the bound endpoint. Read paths never create groups; write paths create missing groups on demand.

Implementations§

Source§

impl CsrShardSet

Source

pub fn group_has_append_log(&self, gid: usize) -> bool

Whether a group holds append-log deltas not yet merged into a base.

Source

pub fn group_append_op_count(&self, gid: usize) -> usize

Committed op count held in one group append log.

Source

pub fn clear_group_append_log(&mut self, gid: usize)

Drop one group append log after its states merged into a base. The row index is memory only; base files plus later logs rebuild it.

Source

pub fn clear_all_append_logs(&mut self)

Drop every group append log, e.g. after a topology-wide rebuild whose base rewrite already carries all states.

Source

pub fn encode_group_append_log( &self, gid: usize, manifest: &TableShardManifest, ) -> Vec<u8> ⓘ

Encode one group append log for an append-only checkpoint. Carries only the address width so group-set growth never invalidates clean groups’ sidecars; a width mismatch is rejected on load instead of replayed against the wrong base. Borrows the in-memory log directly without cloning it into temporaries.

Source

pub fn replay_group_append_log( &mut self, gid: usize, data: &[u8], manifest: &TableShardManifest, ) -> Result<(), StorageError>

Replay one append-log payload into a group base. Fails closed on version, address-width, section-size or trailing-byte mismatches.

Source§

impl CsrShardSet

Source

pub fn mark_reclaim_hint_for(&mut self, vid: u32)

Set the reclaim hint for the group owning vid.

Used by remap to preserve the hint explicitly instead of relying on delete side effects.

Source

pub fn group_needs_reclaim_scan(&self, gid: usize) -> bool

Whether a group may hold tombstones worth a reclaim scan.

Source

pub fn group_dead_entries(&self, gid: usize) -> usize

Physical tombstone entries cached for one group. Zero guarantees the group holds no tombstones, so reclaimable walks can stop at O(1).

Source

pub fn clear_reclaim_hint(&mut self, gid: usize)

Clear the reclaim hint after a pass visited the whole group.

Source

pub fn region_census(&self, gid: usize, region: usize) -> (usize, usize, usize)

Physical census of one leaf region: (live, dead, capacity) summed over its rows in global-vid order.

Source

pub fn region_density(&self, gid: usize, region: usize) -> f32

Live entries per unit of reserved capacity of one leaf region.

Source

pub fn region_live(&self, gid: usize, region: usize) -> usize

Live entries of one leaf region summed over its rows.

Source

pub fn region_gap(&self, gid: usize, region: usize) -> usize

Reserved capacity minus live entries of one leaf region.

Steady-state write room under the current per-row reservation; the region-tail gap model derives the same room from the live count alone.

Source

pub fn region_reclaimable_count( &self, gid: usize, region: usize, cutoff: u64, ) -> usize

Entries of one leaf region reclaimable at cutoff.

Source

pub fn select_merge_scope( &self, gid: usize, region: usize, cutoff: u64, region_min_density: f32, group_min_density: f32, ) -> Option<RegionMergeScope>

Merge scope for one leaf region. The trigger is always the per-row reclaimable count; density only widens the scope, and larger scopes require higher density. Returns None when the region holds nothing reclaimable and carries no delete dirt. Thresholds come from the table configuration so measured write amplification can guide them; the module constants back the configuration defaults.

Source

pub fn compact_region_with_reporting( &mut self, gid: usize, region: usize, cutoff: u64, on_edge_removed: &mut dyn FnMut(EdgeId, u64), ) -> usize

Compact one leaf region in place, reporting removals. Only rows in the region window are visited; other regions never move. Marks the region deleted when entries were dropped so the next checkpoint merges the rebuilt rows. Rows holding overflow are rebalanced into primary gaps on the same pass. Frozen groups bypass the per-row walk and merge once at group scope so one region request never pays one trailing memmove per row.

Source

pub fn compact_frozen_rows_batched( &mut self, gid: usize, locals: &[u32], cutoff: u64, on_edge_removed: &mut dyn FnMut(EdgeId, u64), ) -> usize

Reclaim a listed local-row set of one frozen group in one pass.

Collect-then-merge entry for frozen groups: callers gather reclaimable rows across regions and merge once instead of paying one trailing memmove per row. Mutable groups report zero; their rows use the regular per-row path. Marks the group deleted when entries drop so the next checkpoint persists the rebuilt base.

Source

pub fn compact_group_with_reporting( &mut self, gid: usize, cutoff: u64, reserve_ratio: f32, on_edge_removed: &mut dyn FnMut(EdgeId, u64), ) -> usize

Compact one group in place, reporting removals. Marks the group dirty so the next checkpoint persists the rebuilt rows.

Source

pub fn compact_with_ts_reporting( &mut self, cutoff: u64, reserve_ratio: f32, on_edge_removed: &mut dyn FnMut(EdgeId, u64), ) -> usize

Compact with per-edge removal reporting across all groups. Only groups that actually dropped entries are marked dirty so clean groups are never dragged into the next checkpoint.

Source§

impl CsrShardSet

Source

pub fn batch_put_edges( &mut self, edges: &[(u32, VertexId, EdgeId)], ts: u64, check_duplicates: bool, ) -> Result<usize, StorageError>

Bulk insert pre-grouped edges with one reservation per touched row.

Input is (src, dst, edge_id) triples at global addresses sharing one ts. The shared grouping and write path lives in Self::batch_put_edges_with_ts.

Source

pub fn batch_put_edges_with_ts( &mut self, edges: &[(u32, VertexId, EdgeId, u64)], check_duplicates: bool, ) -> Result<usize, StorageError>

Bulk insert with per-edge timestamps, partitioned by group.

Direct-write counterpart of batch_put_edges for initial loads with heterogeneous timestamps: input is (src, dst, edge_id, ts) quads at global addresses, rows are grouped by shard, each Multiple group is written through its bulk path (single reservation, single live-set rebuild per row) preserving each edge timestamp, and other variants fall back to per-edge inserts. Dirt and append-log entries are recorded per inserted edge exactly like the single-edge path. Duplicate keys are rejected before any write when check_duplicates is set; bulk-import callers prevalidate once and pass false.

Source

pub fn reserve_for_batch( &mut self, counts: &[(u32, usize)], ) -> Result<(), StorageError>

Pre-size touched rows once for an incoming batch.

Groups missing rows are materialized first; each Multiple group sizes its rows at the packed density target so the following per-edge inserts land in reserved gaps. Other strategies skip reservation. Only sizing happens here; inserts still flow through the regular path so dirt and append logs stay exact.

Source§

impl CsrShardSet

Source

pub fn is_bundled(&self) -> bool

Whether this direction stores its single scalar inline.

Source

pub fn bundled_insert_with_value( &mut self, src_vid: u32, dst: VertexId, edge_id: EdgeId, ts: u64, value: Option<u64>, ) -> Result<(), StorageError>

Insert one edge carrying its inline value (None stores NULL).

Dirt and append-log entries mirror the single-edge insert path. Only bundled sets accept a value; anything else is rejected by the variant.

Source

pub fn bundled_value_at( &self, src_vid: u32, edge_id: EdgeId, ) -> Option<(u64, bool)>

Read one edge’s inline value within its source row.

Source

pub fn bundled_value_by_endpoint( &self, src_vid: u32, endpoint: u32, ) -> Option<(u64, bool)>

Read the inline value of the live edge for one endpoint.

Source

pub fn bundled_set_value_by_endpoint( &mut self, src_vid: u32, endpoint: u32, value: Option<u64>, ) -> bool

Overwrite the inline value of the live edge for one endpoint.

The value column rides the group base file rather than the append sidecar, so the update takes delete dirt to force a base rewrite on the next checkpoint. No append record is written: append replay only expresses topology inserts and deletes.

Source

pub fn bundled_revert_with_value( &mut self, src_vid: u32, position: EdgePosition, expected: EdgeId, ts: u64, value: Option<u64>, ) -> bool

Revert a deletion restoring the caller’s value alongside the topology.

Source

pub fn visit_physical_with_values<F>(&self, src_vid: u32, f: F)
where F: FnMut(Nbr, Option<u64>) -> bool,

Visit every physically stored entry of one vertex with its inline value (None for NULL slots and non-bundled forms).

Source

pub fn fill_physical_with_values_into( &self, src_vid: u32, out: &mut Vec<(Nbr, Option<u64>)>, )

Fill a caller buffer with paired topology plus inline values.

Missing groups read as empty and never create groups. Batch scans reuse one buffer across vertices through the paired walk.

Source§

impl CsrShardSet

Source

pub fn route_hit_rate(&self) -> f32

Routing-cache hit rate for observability. Capacity stays fixed; this only reports so operators can tell whether hot lookups hit.

Source

pub fn route_collision_count(&self) -> usize

Routing-cache collision count since creation. Collisions share the miss counter; this separates true empty misses from evictions so operators can tell whether 128 slots still cover the working set.

Source

pub fn new( strategy: EdgeStrategy, group_bits: u32, overflow_chunk_edges: usize, record_form: RecordForm, ) -> Result<CsrShardSet, StorageError>

Source

pub fn strategy(&self) -> EdgeStrategy

Source

pub fn record_form(&self) -> RecordForm

Source

pub fn group_bits(&self) -> u32

Source

pub fn group_size(&self) -> usize

Source

pub fn group_count(&self) -> usize

Source

pub fn existing_group_ids(&self) -> Vec<usize>

Sorted existing group ids. Sparse holes are absent: they read as empty, never consume memory and never produce files.

Source

pub fn group_span(&self) -> usize

One past the largest materialized group, or zero when empty. Only for diagnostics; flush and reclaim paths iterate existing ids alone so a wide sparse span never drags holes along.

Source

pub fn address_span_rows(&self) -> usize

Address-span row count: highest group upper bound minus lowest group lower bound, holes included.

This is the true address upper bound for preallocation and range validation. vertex_capacity instead reports materialized rows only (memory-proportional); callers must pick by purpose and never mix the two calibers.

Source

pub fn set_tombstone_reuse_cutoff(&mut self, cutoff: u64)

Refresh the hot-path tombstone reuse cutoff on every group.

Only watermark-derived bounds refresh; the sentinel disables reuse. See MutableCsr::set_tombstone_reuse_cutoff for the single freshness contract.

Source

pub fn refresh_tombstone_reuse_cutoff(&mut self, fresh: u64)

Fresh watermark refresh allowing widening on every group.

Source

pub fn clear_tombstone_reuse_cutoff(&mut self)

Drop the reuse hint back to the disabled sentinel on every group.

Stale path of the same contract: no fresh watermark means no reuse.

Source

pub fn tombstone_reuse_cutoff(&self) -> u64

Current reuse cutoff for observability and tests. Timestamp::MAX means reuse is disabled.

Source

pub fn ensure_group_id(&mut self, gid: usize) -> Result<(), StorageError>

Ensure one group exists without routing a vertex id. Used when loading an explicit existing-group list and when orphan timestamp shards fall back to group zero.

Source

pub fn group_variant(&self, gid: usize) -> Option<&CsrVariant>

Borrow one persisted group for checkpoint writes.

Source

pub fn group_variant_mut(&mut self, gid: usize) -> Option<&mut CsrVariant>

Mutably borrow one group for checkpoint loads.

Source

pub fn group_mapped(&self, gid: usize) -> Option<MappedFrozen>

Derived serving cache of one group, if the checkpoint load attached one.

Clones share one mapping through the reference count, so snapshotting the handle for a reader is cheap. Only frozen groups ever carry one.

Source

pub fn group_has_mapped(&self, gid: usize) -> bool

Whether one group serves hot reads from its derived mapping.

Source

pub fn set_group_mapped( &mut self, gid: usize, mapped: MappedFrozen, ) -> Result<(), StorageError>

Attach a derived serving cache to a frozen group. Non-frozen groups reject the handle so residency never shadows a writable heap.

Source

pub fn clear_group_mapped(&mut self, gid: usize)

Drop one group serving cache, falling back to heap serving.

Source

pub fn load_group( &mut self, gid: usize, data: &[u8], ) -> Result<(), StorageError>

Load one group payload without marking it dirty. The tombstone counter is derived from the loaded payload in one pass, and the reclaim hint follows it, so clean groups skip reclaim scans without paying one audit walk after every load.

Source

pub fn truncate_trailing_empty_groups(&mut self)

Drop every group holding no physical entries. Tombstone-bearing groups are retained so snapshot history before the cutoff survives. Non-empty strategies keep at least group zero so an empty table stays addressable. Intermediate holes are never materialized, so only existing empty groups are dropped and no empty files are produced.

Source

pub fn clear(&mut self)

Clear all edges, keeping the group space. Marks surviving groups dirty so the next checkpoint persists the cleared state.

Clearing also drops every derived serving cache: the heap form is emptied and the mapping is outside the heap, so the group falls back to heap serving. Missing-group reads stay empty and no group is dropped here.

Source§

impl CsrShardSet

Source

pub fn group_dirty(&self, gid: usize) -> GroupDirty

Dirt of one group; missing groups report clean.

Source

pub fn dirty_group_ids(&self) -> Vec<usize>

Ids of groups holding uncheckpointed writes.

Source

pub fn column_dirty_group_ids(&self) -> Vec<usize>

Ids of groups holding property-only write traces.

Precise write-time marking: every property write marks its owning group, so the flush can limit property shards to traced owners. The table-level property flag remains as a correctness insurance that rewrites all owners when no trace exists, but the regular path always carries a trace.

Source

pub fn checkpoint_kind(&self) -> EdgeCheckpointKind

Checkpoint class for the current dirt without clearing it.

Source

pub fn mark_column_updated_for_group(&mut self, gid: usize)

Trace a property-only write to the group owning vid.

Precise write-time marking: the owning group is materialized when missing (unless the direction stores nothing) so every property write leaves a group trace. The table-level property flag remains as a correctness insurance, but the regular path never needs it. Trace a property-only write to a whole group by id.

Group-granular counterpart of Self::mark_column_updated_for for callers that already resolved the owner (schema fills, drops and renames touch every row of every owner). Materializes the group when missing so the trace is never silently dropped.

Source

pub fn mark_column_updated_for(&mut self, vid: u32)

Source

pub fn clear_group_dirty(&mut self, gid: usize)

Source

pub fn clear_all_dirty(&mut self)

Source

pub fn clear_all_column_dirty(&mut self)

Clear precise column-only traces after a flush. Insert and delete dirt is owned by the per-group flush above and never touched here.

Source

pub fn mark_all_dirty(&mut self)

Mark every group dirty so the next checkpoint rewrites the full direction. Used after topology-wide rebuilds such as vertex remapping, where clean-group skipping would otherwise persist stale group files.

Source

pub fn needs_checkpoint(&self, gid: usize) -> bool

Whether a group holds uncheckpointed writes.

Source

pub fn group_needs_rebalance(&self, gid: usize) -> bool

Whether one group carries delete dirt and needs a base merge rather than an append-only persist.

Source

pub fn region_dirty(&self, gid: usize, region: usize) -> RegionDirty

Dirt of one leaf region; missing groups or regions report clean.

Source

pub fn dirty_region_ids(&self, gid: usize) -> Vec<usize>

Ids of dirty leaf regions inside one group.

Source

pub fn region_needs_checkpoint(&self, gid: usize, region: usize) -> bool

Whether one leaf region holds uncheckpointed topology writes.

Source

pub fn region_needs_rebalance(&self, gid: usize, region: usize) -> bool

Whether one leaf region carries delete dirt and needs a base merge rather than an append-only persist.

Source

pub fn clear_region_dirty(&mut self, gid: usize, region: usize)

Source§

impl CsrShardSet

Source

pub fn is_frozen(&self, gid: usize) -> bool

Whether one existing group is frozen.

Source

pub fn is_group_frozen_for(&self, vid: u32) -> bool

Whether the group owning vid exists and is frozen.

Source

pub fn freeze_group( &mut self, gid: usize, cutoff: u64, reserve_ratio: f32, on_edge_removed: &mut dyn FnMut(EdgeId, u64), ) -> Result<u64, StorageError>

Freeze one group in place, returning its packed live edge count.

Reclaims first at cutoff through the shared group compaction when the caller passes an active cutoff, reporting removals through on_edge_removed for the authority above; a maximum cutoff packs verbatim with no removals. Only Multiple, Single, Pure and Bundled groups freeze; missing groups, None groups and already-frozen groups are rejected.

Source

pub fn freeze_feasibility(&self, gid: usize) -> FreezeFeasibility

Read-only freeze outcome for one group.

Runs the same gate freeze_group enforces, without compaction, packing or authority traffic. A Ready group freezes if nothing changes in between; a Blocked group reports the exact rejection reason, including whether migrating to the columnar form lifts it.

Source

pub fn unfreeze_group(&mut self, gid: usize) -> Result<u64, StorageError>

Unfreeze one group, rebuilding its mutable variant.

Replays every packed row through the regular insert entry and restores deletion stamps through the regular delete entry, so the rebuilt rows carry the same logical content in fresh physical order. Gap sentinels are not replayed: they are reserved-slot fillers, never edges. Bundled groups additionally replay their carried values through the regular valued insert entry, restoring the same words and validity bits. The rebuilt shape follows the set strategy. Only frozen groups unfreeze; anything else is rejected.

Source§

impl CsrShardSet

Source

pub fn iter_edges_of(&self, src_vid: u32, ts: u64) -> Option<CsrRowIter<'_>>

Iterate edges of a vertex without allocating, for every strategy. Test-only row-stamp filtered iterator; production scans go through the version authority.

Source

pub fn iter_all(&self) -> ShardCsrIterator<'_> ⓘ

Iterate every physically present entry across groups, including tombstoned ones, in group order. Visibility is decided above this layer by the version authority.

Source§

impl CsrShardSet

Source

pub fn primary_contains(&self, src_vid: u32, edge_id: EdgeId) -> bool

Whether the primary row of one vertex holds edge_id.

Source

pub fn group_of(&self, vid: u32) -> Option<usize>

Owner group of one global vertex id without creating groups.

Shared row-location entry point for point lookups, adjacency batches and full scans: every read path resolves rows through this routing instead of duplicating the group arithmetic.

Source

pub fn visit_physical<F>(&self, src_vid: u32, f: F)
where F: FnMut(Nbr) -> bool,

Visit every physically stored entry of one vertex without allocating.

Source

pub fn visit_hot<F>(&self, src_vid: u32, f: F)
where F: FnMut(HotNbr) -> bool,

Visit every physically stored hot half of one vertex without allocating and without touching the stamp lines.

Hot-only counterpart of Self::visit_physical for traversals that resolve visibility through the version authority by edge_id.

Source

pub fn fill_physical_into(&self, src_vid: u32, out: &mut Vec<Nbr>)

Fill a caller buffer with every physically stored entry of one vertex.

Same content as the allocating trait accessor, without the per-vertex allocation. Missing groups read as empty and never create groups.

Source

pub fn fill_physical_batch_into( &self, vids: &[u32], out: &mut Vec<Nbr>, offsets: &mut Vec<usize>, )

Fill one shared buffer with the physical entries of many vertices.

Records one start offset per vertex plus a trailing end offset, so out[offsets[i]..offsets[i + 1]] is vertex vids[i] in order. One pass over the vertices, no per-vertex allocation; missing groups and empty rows contribute empty slices. Read paths never create groups.

Dispatch stays converged in CsrVariant: each run borrows its shard once (one map lookup per run), then walks rows through the variant single-row entry. The row loop pays one variant match per row, which is noise next to the per-row routing plus the row walk itself; in return there are no per-form arms to keep in sync here, so adding a form only touches the variant read entries.

Source

pub fn fill_physical_with_values_batch_into( &self, vids: &[u32], out: &mut Vec<(Nbr, Option<u64>)>, offsets: &mut Vec<usize>, )

Fill one shared buffer with paired topology plus inline values.

Batched counterpart of the single-row paired fill: same offsets contract as the topology batch above, but each entry carries its inline value. Non-bundled forms fill with None values through the same walk. Like the topology batch, each run borrows its shard once and walks rows through the variant paired entry, so there are no per-form arms to keep in sync here either.

Source

pub fn is_row_sorted(&self, src_vid: u32) -> bool

Whether the live entries of one row arrive in key order.

Only frozen and single-slot rows promise order and may use bisection; other variants report an observation that is memory-only, rebuilt on load and never cached across restarts. Planning paths prefer should_use_bisection below so the promise plus the live observation stay in one place. Frozen groups serve the same sorted order from the heap and from a derived mapping alike.

Source

pub fn should_use_bisection(&self, src_vid: u32) -> bool

Whether a range scan should bisect this row.

Central plan selection combining the order promise with the live sorted observation. Missing groups read as sorted empty. The result is memory-only and must never be cached across restarts.

Source

pub fn sort_row(&mut self, src_vid: u32) -> bool

Sort one row on the maintenance path. Positions for the row go stale.

Source

pub fn visit_threshold<F>( &self, src_vid: u32, lower: Option<(u32, i64)>, upper: Option<(u32, i64)>, f: F, )
where F: FnMut(Nbr) -> bool,

Visit live entries of one row whose key falls in the inclusive range.

Pure and bundled rows ignore the rank halves by contract: callers pass endpoint intervals there.

Source

pub fn fill_threshold_into( &self, src_vid: u32, lower: Option<(u32, i64)>, upper: Option<(u32, i64)>, out: &mut Vec<Nbr>, )

Fill a caller buffer with the same range content as visit_threshold.

Source

pub fn visit_threshold_endpoint_only<F>( &self, src_vid: u32, lower: Option<u32>, upper: Option<u32>, f: F, )
where F: FnMut(Nbr) -> bool,

Visit entries whose endpoint falls in the inclusive endpoint range.

Endpoint-only counterpart of visit_threshold sharing one interval across forms. Missing groups read as empty and never create groups.

Source

pub fn fill_threshold_endpoint_only_into( &self, src_vid: u32, lower: Option<u32>, upper: Option<u32>, out: &mut Vec<Nbr>, )

Fill a caller buffer with the same endpoint-range content.

Source§

impl CsrShardSet

Source

pub fn group_stats(&self, gid: usize) -> Option<NodeGroupStats>

Observability view of one group.

Source

pub fn group_live_count(&self, gid: usize) -> u64

Live edge count of one group for segment statistics.

Source

pub fn bytes_per_edge(&self) -> usize

Average bytes per edge based on actual memory usage. Measured value only, with no fallback: empty tables report zero, and a degenerate zero measurement on a non-empty table reports zero with a debug line. Callers handle zero explicitly.

Source

pub fn fragmentation_stats(&self) -> Option<FragmentationStats>

Whole-set fragmentation statistics, summed across groups. Observation metric only; collection triggers use per-vertex counts. Sums every group reporting detailed stats; groups without reserved row capacity contribute nothing. Returns none when no group reports.

Source

pub fn fragmentation_ratio(&self) -> f32

Whole-set fragmentation ratio, summed across groups. Observation metric only; collection triggers use per-vertex counts. Shares the single wasted-share caliber through the summed snapshot below instead of a second aggregation loop.

Source

pub fn wasted_bytes_estimate(&self) -> usize

Estimate wasted bytes due to fragmentation, summed across groups.

Source

pub fn used_memory_size(&self) -> usize

Approximate memory usage in bytes, summed across existing groups. Missing groups consume nothing, so sparse tables stay proportional to materialized groups rather than the endpoint span. Derived serving caches count on top of their authoritative heap form.

Source

pub fn layer_counts(&self) -> (usize, usize)

Narrow vs wide row counts summed across groups.

Thresholds stay fixed; this only reports so slow traversals can be attributed to a row width layer. Only multi-edge groups report; other forms contribute zero.

Trait Implementations§

Source§

impl Clone for CsrShardSet

Source§

fn clone(&self) -> CsrShardSet

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CsrBase for CsrShardSet

Source§

fn vertex_capacity(&self) -> usize

Materialized rows only: existing groups times group size.

Memory-proportional by design, so sparse tables stay proportional to materialized groups. Not an address upper bound: holes are excluded, use address_span_rows when a true bound is needed.

Source§

fn dump(&self) -> Vec<u8> ⓘ

Whole-direction dump is rejected by design: persistence moves through the per-group incremental protocol only, so a whole-direction payload would silently bypass group dirt, append sidecars and shard manifests. Any call here is a caller bug and fails loudly instead of returning an empty payload that a reader could mistake for an empty table.

Source§

fn load(&mut self, _data: &[u8]) -> Result<(), StorageError>

Whole-direction load is rejected by design, mirroring the dump guard above. Group payloads load through the per-group path instead.

Source§

fn edge_count(&self) -> u64

Source§

fn dump_into(&self, _out: &mut Vec<u8>)

Append the same bytes as dump into out without an intermediate owned buffer, so checkpoint writes borrow the live topology instead of cloning it for serialization.
Source§

impl Debug for CsrShardSet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl MutableCsrTrait for CsrShardSet

Source§

fn insert_edge( &mut self, src_vid: u32, dst: VertexId, edge_id: EdgeId, ts: u64, ) -> Result<(), StorageError>

Insert an edge. Read more
Source§

fn delete_edge( &mut self, src_vid: u32, edge_id: EdgeId, ts: u64, ) -> Result<bool, StorageError>

Delete an edge by edge_id. Read more
Source§

fn delete_edge_by_dst(&mut self, src_vid: u32, dst: VertexId, ts: u64) -> usize

Delete all edges matching (src, dst) with full-match semantics. Read more
Source§

fn delete_edge_by_dst_reporting( &mut self, src_vid: u32, dst: VertexId, ts: u64, on_deleted: &mut dyn FnMut(EdgeId), ) -> usize

Delete all edges matching (src, dst), reporting every stamped id. Read more
Source§

fn delete_edge_by_dst_reporting_positioned( &mut self, src_vid: u32, dst: VertexId, ts: u64, on_deleted: &mut dyn FnMut(EdgeId, Option<EdgePosition>), ) -> usize

Delete all edges matching (src, dst), reporting each stamped id with its row position. Read more
Source§

fn locate_edge( &self, src_vid: u32, edge_id: EdgeId, ) -> Option<(EdgePosition, Nbr)>

Locate one stored edge, returning its row position and copy. Read more
Source§

fn delete_edge_at_position( &mut self, src_vid: u32, position: EdgePosition, expected: EdgeId, ts: u64, ) -> Result<bool, StorageError>

Delete the edge at position when it still holds expected id. Read more
Source§

fn revert_delete_at_position( &mut self, src_vid: u32, position: EdgePosition, expected: EdgeId, ts: u64, ) -> bool

Revert the deletion at position when it still holds expected id. Read more
Source§

fn delete_edge_by_offset( &mut self, src_vid: u32, offset: i32, ts: u64, ) -> Result<bool, StorageError>

Delete an edge by its offset position in the primary block. Read more
Source§

fn nbr_at_offset(&self, src_vid: u32, offset: i32) -> Option<Nbr>

Read-only view of one primary slot for offset identity checks.
Source§

fn get_edge_physical(&self, src_vid: u32, dst: VertexId) -> Option<Nbr>

Locate the first live edge by endpoint without consulting snapshots. Read more
Source§

fn physical_edges_of(&self, src_vid: u32) -> Vec<Nbr>

Every physically stored entry of one vertex without timestamp filtering. Read more
Source§

fn fill_physical_into(&self, src_vid: u32, out: &mut Vec<Nbr>)

Fill a caller buffer with every physically stored entry of one vertex. Read more
Source§

fn has_physical_entries(&self, vid: u32) -> bool

Whether one vertex holds any physically stored entry.
Source§

fn primary_contains(&self, src_vid: u32, edge_id: EdgeId) -> bool

Whether the primary row of one vertex holds edge_id.
Source§

fn revert_delete_by_offset( &mut self, src_vid: u32, offset: i32, ts: u64, ) -> bool

Revert a deleted edge by its offset position. Read more
Source§

fn rollback_insert(&mut self, src_vid: u32, edge_id: EdgeId) -> bool

Erase one just-inserted edge for insert rollback (no tombstone trace). Read more
Source§

fn revert_delete_by_edge_id( &mut self, src_vid: u32, edge_id: EdgeId, ts: u64, ) -> bool

Revert a deletion by edge id if it happened at or before ts. Read more
Source§

fn get_edge(&self, src_vid: u32, dst: VertexId, ts: u64) -> Option<Nbr>

Get a specific edge by source and destination. Test-only row-stamp filter; production reads go through the version authority.
Source§

fn edges_of(&self, src_vid: u32, ts: u64) -> Vec<Nbr>

Get all valid edges of a vertex at the given timestamp. Test-only row-stamp filter; production reads go through the version authority. Test and offline use; production traversals use the visitor or caller-buffer fill paths instead of this allocating accessor.
Source§

fn compact_vertex_with_reporting( &mut self, vid: u32, cutoff: u64, on_edge_removed: &mut dyn FnMut(EdgeId, u64), ) -> usize

Reclaim one vertex in place, dropping entries eligible for collection at cutoff and tightening live entries without touching other rows. Read more
Source§

fn reclaimable_count(&self, vid: u32, cutoff: u64) -> usize

Count entries of one vertex that are reclaimable at cutoff. Read more
Source§

fn vertex_needs_compact(&self, vid: u32, cutoff: u64) -> bool

Whether one vertex holds anything reclaimable at cutoff.
Source§

fn vertex_census(&self, vid: u32) -> (usize, usize, usize)

Physical entry census of one vertex: (live, dead, capacity). Read more
Source§

fn vertex_reclaim_probe(&self, vid: u32, cutoff: u64) -> (usize, usize)

Single-walk reclaim probe of one vertex: (dead, reclaimable). Read more
Source§

fn row_gap(&self, vid: u32) -> usize

Reserved primary slots minus live primary entries of one row. Read more
Source§

fn row_density(&self, vid: u32) -> f32

Live primary entries per unit of reserved primary capacity. Read more
Source§

fn rebalance_row(&mut self, vid: u32) -> bool

Rebalance one row in place, pulling overflow entries into primary gaps and repacking leftover overflow. Returns true when the row no longer holds overflow. Strategies without rows report true.
Source§

fn used_memory_size(&self) -> usize

Return the approximate memory usage in bytes.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more