Renaming
This commit is contained in:
parent
3076bcd83e
commit
85ef52dfb4
2 changed files with 13 additions and 9 deletions
|
|
@ -31,38 +31,38 @@ pub struct Index<K, V> {
|
|||
pub struct IndexHeader {
|
||||
}
|
||||
|
||||
impl <I, V>Index<I, V> {
|
||||
pub async fn new(file_name: &str) -> Result<Index<I, V>> {
|
||||
impl <K, V>Index<K, V> {
|
||||
pub async fn new(file_name: &str) -> Result<Index<K, V>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub async fn connect(file_name: &str) -> Result<Index<I, V>> {
|
||||
pub async fn connect(file_name: &str) -> Result<Index<K, V>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
// Saves the in-memory index to disk and deallocates.
|
||||
pub async fn sleep() -> Result<Index<I, V>> {
|
||||
pub async fn sleep() -> Result<Index<K, V>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
// Loads the index into memory
|
||||
pub async fn wake() -> Result<Index<I, V>> {
|
||||
pub async fn wake() -> Result<Index<K, V>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub async fn insert() -> Result<()>
|
||||
where I: Encode, V: Encode
|
||||
where K: Encode, V: Encode
|
||||
{
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub async fn lookup(&mut self, k: I) -> Result<Option<V>>
|
||||
where I: Encode + Decode,
|
||||
pub async fn lookup(&mut self, k: K) -> Result<Option<V>>
|
||||
where K: Encode + Decode,
|
||||
{
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub async fn delete(&mut self, k: I) -> Result<Option<V>> {
|
||||
pub async fn delete(&mut self, k: K) -> Result<Option<V>> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue