Expand description
Advanced segment and field-lease surface.
Structs§
- Ref
- RefMut
- SegRef
- Shared typed segment guard: a
Ref<T>paired with aSegmentLeasethat releases the registry entry on drop. - SegRef
Mut - Exclusive typed segment guard.
- Segment
- Compile-time descriptor of a typed byte range inside an account.
- Segment
Borrow - A single active segment borrow.
- Segment
Borrow Guard - RAII guard that releases a segment borrow when dropped.
- Segment
Borrow Registry - Instruction-scoped segment borrow registry.
- Segment
Descriptor - A single segment descriptor.
- Segment
Entry - A segment entry in the registry.
- Segment
Lease - RAII lease on one registered entry in a
SegmentBorrowRegistry. - Segment
Registry - Read-only view over a segmented account’s registry.
- Segment
Registry Mut - Mutable view over a segmented account’s registry.
- Segment
Slice - Type-safe immutable slice over a segment’s elements.
- Segment
Slice Mut - Type-safe mutable slice over a segment’s elements.
- Segment
Table - Read-only segment table.
- Segment
Table Mut - Mutable segment table.
- Static
Segment - A compile-time constant segment descriptor.
- Typed
Segment - Compile-time typed segment descriptor:
Tis the overlay type,OFFSETis the absolute byte offset from the start of account data. Zero-sized.
Enums§
- Access
Kind - Read or write access intent for a segment borrow.
- Segment
Role - Segment role classification.
Constants§
- MAX_
REGISTRY_ SEGMENTS - Maximum segments in a registry.
- MAX_
SEGMENTS - Maximum number of segments per account.
- REGISTRY_
HEADER_ SIZE - Size of the segment registry header.
- REGISTRY_
OFFSET - Offset where the registry header starts (after AccountHeader).
- SEGMENT_
DESC_ SIZE - Size of one segment descriptor in bytes.
- SEGMENT_
ENTRY_ SIZE - Size of one segment entry in bytes.
- SEG_
FLAG_ DYNAMIC - SEG_
FLAG_ FROZEN - SEG_
FLAG_ LOCKED - Flags for segment entries.
- SEG_
ROLE_ AUDIT - SEG_
ROLE_ CACHE - SEG_
ROLE_ CORE - Segment role flags – convenience constants for
SegmentEntry::new(). - SEG_
ROLE_ EXTENSION - SEG_
ROLE_ INDEX - SEG_
ROLE_ JOURNAL - SEG_
ROLE_ SHARD
Traits§
- Segment
Map - Compile-time segment layout for a zero-copy struct.
Functions§
- assert_
segment_ field_ alignment - Compile-time assertion that a type’s
SegmentMapandFieldMapare isomorphic: same count, same names, same offsets, same sizes. - segment_
id - Compute a segment ID from a name (const FNV-1a hash, truncated to 4 bytes).
Type Aliases§
- Segment
Id - A 4-byte segment identifier, computed from a name at compile time.