Skip to content

Commit

Permalink
add ser/deser to keyset and compression traits
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo committed Sep 19, 2023
1 parent 0484046 commit 237952a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/storage/nippy-jar/src/compression/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::io::Write;
mod zstd;
pub use zstd::{Zstd, ZstdState};

pub trait Compression {
pub trait Compression: Serialize + for<'a> Deserialize<'a> {
/// Returns decompressed data.
fn decompress(&self, value: &[u8]) -> Result<Vec<u8>, NippyJarError>;

Expand Down
2 changes: 1 addition & 1 deletion crates/storage/nippy-jar/src/phf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod go_fmph;
pub use go_fmph::GoFmph;

/// Trait to build and query a perfect hashing function.
pub trait KeySet {
pub trait KeySet: Serialize + for<'a> Deserialize<'a> {
/// Adds the key set and builds the perfect hashing function.
fn set_keys<T: AsRef<[u8]> + Sync + Clone + Hash>(
&mut self,
Expand Down

0 comments on commit 237952a

Please sign in to comment.