Module cache_object

Module cache_object 

Source

Structs§

ArcWrapper
Implementing encapsulation of Arc to enable third-party Trait HeapSize implementation for the Arc type Because of use Arc in LruCache, the LruCache is not clear whether a pointer will drop the referenced content when it is ejected from the cache, the actual memory usage is not accurate
CacheObject

Traits§

ArcWrapperBounds
trait alias for simple use
FileLoadStore
file load&store trait
MemSizeRecorder
Heap-size recorder for a class(struct)
You should use a static Var to record mem-size and record mem-size after construction & minus it in drop()
So, variable-size fields in object should NOT be modified to keep heap-size stable.
Or, you can record the initial mem-size in this object
Or, update it (not impl)