pub struct Storage { /* private fields */ }
Expand description
Storage is what stores the inputs and outputs to queries.
Inside, it has a bump allocator which will grow like a memory leak…
That’s why there’s Context::gc
.
Note: the main thing that grows storage is new generations as that
invalidates a lot of the cache. serializing
and deserializing do not store elements and
that would be garbage collected otherwise (so a serialize –> deserialize
cycle is effectively equivalent to a garbage collect). Thus, you might not
need to care about this storage growing too much if you serialize the
Context
regularly.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Storage
impl !RefUnwindSafe for Storage
impl Send for Storage
impl !Sync for Storage
impl Unpin for Storage
impl !UnwindSafe for Storage
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