pub trait CacheInsert {
// Required method
fn insert(
&mut self,
key_: &Slice,
value: *mut c_void,
charge: usize,
deleter: fn(key_: &Slice, value: *mut c_void) -> c_void,
) -> *mut CacheHandle;
}Required Methods§
Sourcefn insert(
&mut self,
key_: &Slice,
value: *mut c_void,
charge: usize,
deleter: fn(key_: &Slice, value: *mut c_void) -> c_void,
) -> *mut CacheHandle
fn insert( &mut self, key_: &Slice, value: *mut c_void, charge: usize, deleter: fn(key_: &Slice, value: *mut c_void) -> c_void, ) -> *mut CacheHandle
| Insert a mapping from key->value into the | cache and assign it the specified charge | against the total cache capacity. | | Returns a handle that corresponds to the | mapping. The caller must call | this->Release(handle) when the returned | mapping is no longer needed. | | When the inserted entry is no longer needed, | the key and value will be passed to | “deleter”.