pub struct Cache<PAGE: PageStatesCache, POINTERS: PagePointersCache, KEYS: KeyPointersCache<KEY>, KEY = ()> { /* private fields */ }Expand description
A cache object of which the various things it keeps track of can be configured..
This cache has to be kept around and passed to every api call to the same memory region until the cache gets discarded.
Valid usecase:
Create cache 1 -> use 1 -> use 1 -> create cache 2 -> use 2 -> use 2
Invalid usecase:
Create cache 1 -> use 1 -> create cache 2 -> use 2 -> ❌ use 1 ❌
Make sure the page count is correct when it has to be provided. If the number is lower than the actual amount, the code will panic.
Implementations§
Source§impl<PAGE: PageStatesCache, POINTERS: PagePointersCache, KEYS: KeyPointersCache<KEY>, KEY> Cache<PAGE, POINTERS, KEYS, KEY>
impl<PAGE: PageStatesCache, POINTERS: PagePointersCache, KEYS: KeyPointersCache<KEY>, KEY> Cache<PAGE, POINTERS, KEYS, KEY>
Trait Implementations§
impl<PAGE: PageStatesCache, POINTERS: PagePointersCache, KEYS: KeyPointersCache<KEY>, KEY> CacheImpl<KEY> for Cache<PAGE, POINTERS, KEYS, KEY>
Auto Trait Implementations§
impl<PAGE, POINTERS, KEYS, KEY> Freeze for Cache<PAGE, POINTERS, KEYS, KEY>
impl<PAGE, POINTERS, KEYS, KEY> RefUnwindSafe for Cache<PAGE, POINTERS, KEYS, KEY>
impl<PAGE, POINTERS, KEYS, KEY> Send for Cache<PAGE, POINTERS, KEYS, KEY>
impl<PAGE, POINTERS, KEYS, KEY> Sync for Cache<PAGE, POINTERS, KEYS, KEY>
impl<PAGE, POINTERS, KEYS, KEY> Unpin for Cache<PAGE, POINTERS, KEYS, KEY>
impl<PAGE, POINTERS, KEYS, KEY> UnsafeUnpin for Cache<PAGE, POINTERS, KEYS, KEY>
impl<PAGE, POINTERS, KEYS, KEY> UnwindSafe for Cache<PAGE, POINTERS, KEYS, KEY>
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