Skip to main content

prefix_range

Function prefix_range 

Source
pub fn prefix_range(prefix: &[u8]) -> (Vec<u8>, Vec<u8>)
Expand description

Inclusive start / exclusive end range covering all keys under a prefix.

ยงExamples

use rushdb_types::keys::prefix_range;

let (start, end) = prefix_range(b"ab");
assert_eq!(start, b"ab");
assert_eq!(end, b"ac");