Crate prefix_range

Source
Expand description

Code for computing an upper bound for BTreeMapRange for a string prefix.

While this crate doesn’t need std, it does need alloc.

Taken from https://www.thecodedmessage.com/posts/prefix-ranges/ (by Jimmy Hartzell) Extended with documentation.

Licensed under: MIT

Functions§

prefixed_set
Create a new BTreeSet that contains all the keys with the given prefix
upper_bound_from_prefix
Find the key to use as an upper bound for range query