Skip to content

Commit

Permalink
SeekKeyEncoder fro test field
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-stig committed Jul 5, 2024
1 parent fd0c31b commit dd10d88
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ impl<S: Schema> KeyEncoder<S> for TestField {
}
}

impl<S: Schema> SeekKeyEncoder<S> for TestField {
fn encode_seek_key(&self) -> Result<Vec<u8>, CodecError> {
Ok(self.0.to_be_bytes().to_vec())
}
}

/// KeyPrefix over single u32
pub struct KeyPrefix1(pub u32);

Expand Down

0 comments on commit dd10d88

Please sign in to comment.