@@ -5,57 +5,60 @@ use std::sync::Arc;
|
||||
|
||||
use super::Block;
|
||||
|
||||
pub struct BlockIterator {}
|
||||
/// Iterates on a block.
|
||||
pub struct BlockIterator {
|
||||
block: Arc<Block>,
|
||||
key: Vec<u8>,
|
||||
value: Vec<u8>,
|
||||
idx: usize,
|
||||
}
|
||||
|
||||
impl BlockIterator {
|
||||
fn new(block: Arc<Block>) -> Self {
|
||||
unimplemented!()
|
||||
Self {
|
||||
block,
|
||||
key: Vec::new(),
|
||||
value: Vec::new(),
|
||||
idx: 0,
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a block iterator and seek to the first entry.
|
||||
pub fn create_and_seek_to_first(block: Arc<Block>) -> Self {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Creates a block iterator and seek to the first key that >= `key`.
|
||||
pub fn create_and_seek_to_key(block: Arc<Block>, key: &[u8]) -> Self {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Returns the key of the current entry.
|
||||
pub fn key(&self) -> &[u8] {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Returns the value of the current entry.
|
||||
pub fn value(&self) -> &[u8] {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Returns true if the iterator is valid.
|
||||
pub fn is_valid(&self) -> bool {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Seeks to the first key in the block.
|
||||
pub fn seek_to_first(&mut self) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn seek_to_last(&mut self) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn seek_to(&mut self, idx: usize) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Move to the next key in the block.
|
||||
pub fn next(&mut self) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Seek to the first key that >= `key`.
|
||||
pub fn seek_to_key(&mut self, key: &[u8]) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user