pub struct RangeLex {
pub min: Vec<u8>,
pub max: Vec<u8>,
pub minex: bool,
pub maxex: bool,
pub min_infinite: bool,
pub max_infinite: bool,
pub offset: usize,
pub count: Option<usize>,
pub reversed: bool,
}Expand description
Lexicographical range specification (aligned with Apache Kvrocks RangeLex). 字典序范围规格(对标 Apache Kvrocks RangeLex,统一用于 ZSet + Hash)
Fields§
§min: Vec<u8>§max: Vec<u8>§minex: bool§maxex: bool§min_infinite: bool§max_infinite: bool§offset: usize§count: Option<usize>§reversed: boolImplementations§
Source§impl RangeLex
impl RangeLex
pub fn new(min: impl Into<Vec<u8>>, max: impl Into<Vec<u8>>) -> Self
pub fn unbounded() -> Self
pub fn is_empty(&self) -> bool
pub fn check(&self, member: &[u8]) -> bool
Sourcepub fn from_bounds(
min_bound: &[u8],
max_bound: &[u8],
offset: usize,
count: Option<usize>,
) -> Result<Self>
pub fn from_bounds( min_bound: &[u8], max_bound: &[u8], offset: usize, count: Option<usize>, ) -> Result<Self>
Constructs RangeLex from Redis boundary string with strict validation. 从 Redis 边界字符串或字节切片构造 RangeLex(严格校验 min 为 -/(/[,max 为 +/(/[)
Sourcepub fn parse_min_bound(bound: &[u8]) -> Result<(Vec<u8>, bool, bool)>
pub fn parse_min_bound(bound: &[u8]) -> Result<(Vec<u8>, bool, bool)>
Parses Redis lexicographical lower bound (valid min is “-” or starts with ‘(’ / ‘[’). 解析 Redis 字典序下界(合法的 min 为 “-” 或以 ‘(’ / ‘[’ 开头)
Trait Implementations§
impl Eq for RangeLex
Source§impl IntoRangeLex for RangeLex
impl IntoRangeLex for RangeLex
fn into_range_lex(self) -> RangeLex
Source§impl IntoRangeLex for &RangeLex
impl IntoRangeLex for &RangeLex
fn into_range_lex(self) -> RangeLex
impl StructuralPartialEq for RangeLex
Auto Trait Implementations§
impl Freeze for RangeLex
impl RefUnwindSafe for RangeLex
impl Send for RangeLex
impl Sync for RangeLex
impl Unpin for RangeLex
impl UnsafeUnpin for RangeLex
impl UnwindSafe for RangeLex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.