pub struct TableCache { /* private fields */ }
Implementations§
Source§impl TableCache
impl TableCache
pub fn new(dbname: &String, options: &Options, entries: i32) -> Self
pub fn find_table( &mut self, file_number: u64, file_size: u64, handle: *mut *mut CacheHandle, ) -> Status
Sourcepub fn new_iterator(
&mut self,
options: &ReadOptions,
file_number: u64,
file_size: u64,
tableptr: *mut *mut Table,
) -> *mut LevelDBIterator
pub fn new_iterator( &mut self, options: &ReadOptions, file_number: u64, file_size: u64, tableptr: *mut *mut Table, ) -> *mut LevelDBIterator
| Return an iterator for the specified file | number (the corresponding file length must be | exactly “file_size” bytes). If “tableptr” is | non-null, also sets “*tableptr” to point to | the Table object underlying the returned | iterator, or to nullptr if no Table object | underlies the returned iterator. The | returned “*tableptr” object is owned by the | cache and should not be deleted, and is valid | for as long as the returned iterator is live.
Sourcepub fn get(
&mut self,
options: &ReadOptions,
file_number: u64,
file_size: u64,
k: &Slice,
arg: *mut c_void,
handle_result: fn(_0: *mut c_void, _1: &Slice, _2: &Slice) -> c_void,
) -> Status
pub fn get( &mut self, options: &ReadOptions, file_number: u64, file_size: u64, k: &Slice, arg: *mut c_void, handle_result: fn(_0: *mut c_void, _1: &Slice, _2: &Slice) -> c_void, ) -> Status
| If a seek to internal key “k” in specified | file finds an entry, call | (*handle_result)(arg, found_key, | found_value).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableCache
impl !RefUnwindSafe for TableCache
impl !Send for TableCache
impl !Sync for TableCache
impl Unpin for TableCache
impl !UnwindSafe for TableCache
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