pub struct JSONSharedValue { /* private fields */ }Expand description
Port of JSONSharedValue (JSONParser.h:704-726). Pairs a JSON value
reference with the Rc<Bump> arena that backs it so the caller can own
both without worrying about arena lifetime. C++ uses const JSONValue* +
shared_ptr<const Allocator>; here the raw pointer is lifetime-erased to
'static and re-tied in get() via one encapsulated unsafe deref.
§Invariant
value is allocated in allocator. The Rc<Bump> keeps the arena alive
for at least as long as this holder, so the pointer is always valid.
Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more