pub struct KeyPos { /* private fields */ }Expand description
Position record for one parsed key.
The full key bytes live in key. When a hash tag is configured
and the tag delimiters are present in the key, tag indexes the
range inside key that should be hashed for routing; otherwise
tag covers the whole key and is equal to 0..key.len().
§Examples
use dynomite::msg::keypos::KeyPos;
let kp = KeyPos::without_tag(b"user:42".to_vec());
assert_eq!(kp.key(), b"user:42");
assert_eq!(kp.tag_bytes(), b"user:42");Implementations§
Trait Implementations§
impl Eq for KeyPos
impl StructuralPartialEq for KeyPos
Auto Trait Implementations§
impl Freeze for KeyPos
impl RefUnwindSafe for KeyPos
impl Send for KeyPos
impl Sync for KeyPos
impl Unpin for KeyPos
impl UnsafeUnpin for KeyPos
impl UnwindSafe for KeyPos
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
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§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.