Expand description
Lifetime-scoped reference newtypes for values held in the platform cache.
Each reference type wraps a std::cell::Ref or std::cell::RefMut borrow into a cached
cell, hiding the smart-pointer leak from public Cache accessor signatures and providing
ergonomic trait impls (Deref, PartialEq against the inner value, Display, Debug).
The borrow drops with the enclosing scope, which makes any attempt to hold it across a cache
mutation panic at runtime: a loud failure beats the silent staleness that a stored clone
would produce. Use the corresponding *_owned accessor on Cache when an owned snapshot is
needed for a boundary handover.
Structsยง
- Account
Ref - Lifetime-scoped read borrow of a cached account.
- Account
RefMut - Lifetime-scoped exclusive write borrow of a cached account.
- Order
Ref - Lifetime-scoped read borrow of a cached order.
- Order
RefMut - Lifetime-scoped exclusive write borrow of a cached order.
- Position
Ref - Lifetime-scoped read borrow of a cached position.
- Position
RefMut - Lifetime-scoped exclusive write borrow of a cached position.