Expand description
A typed concurrent address space with generation-safe ownership.
§Address key contracts
Address keys (A: Eq + Hash + Clone) must satisfy these invariants on
every call that passes through the space:
- Deterministic.
HashandEqmust produce the same output for the same input every time they are called. - Consistent.
HashandEqmust agree: ifa == b, thena.hash(…)andb.hash(…)must write the same bytes to the hasher (theHashtrait requirement). - No panic.
HashandEqmust never panic. A panickingHashorEqduringclaim,resolve, orreleasemay leave the address space in an inconsistent state. - No re-entrancy.
HashandEqmust not call any method of the sameAddressSpacefrom which they were invoked. The hash-table probe runs under the table’s write or read guard, andparking_lotlocks are not re-entrant: a re-entrantHashorEqwill deadlock. (EndpointCloneandDropare intentionally run outside the lock and can safely re-enter the space.) - Identity-preserving
Clone.A: Clonemust preserveEqandHashidentity: for every address valuea,a.clone() == aanda.clone()hashes to the same value asa. The reference documentation calls this the logical Clone contract for key types.
Structs§
- Address
InUse - A failed attempt to claim an address that already has a live owner.
- Address
Space - A shared mapping from addresses to typed endpoints.
- Lease
- Exclusive ownership of one exact address registration generation.
- Registration
Id - Opaque identity of one exact registration within the current process.
- Registration
Scope Id - Opaque identity of one address-space scope within the current process.
- Resolved
- A read-only capability for one resolved endpoint snapshot.
Enums§
- Claim
Error - The reason an address claim failed.