-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move PaginatedResponse from lib to cache
- Loading branch information
1 parent
f0e4498
commit 8d55b3a
Showing
4 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
//! All structs related to caching layer of Rockbound. | ||
|
||
use crate::Schema; | ||
|
||
pub mod cache_container; | ||
pub mod cache_db; | ||
pub mod change_set; | ||
pub mod delta_reader; | ||
|
||
/// Id of ChangeSet/snapshot/cache layer | ||
pub type SnapshotId = u64; | ||
|
||
/// Response for a paginated query which also includes the "next" key to pass. | ||
#[derive(Debug)] | ||
pub struct PaginatedResponse<S: Schema> { | ||
/// A vector of storage keys and their values | ||
pub key_value: Vec<(S::Key, S::Value)>, | ||
/// Key indicating the first key after the final pair from key_value. | ||
/// Meant to be passed in subsequent queries | ||
pub next: Option<S::Key>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters