pub enum KeyPattern {
Glob {
pattern: Vec<u8>,
},
Regex {
pattern: String,
},
}Expand description
Explicit matching mode for raw KV keys.
Variants§
Glob
Byte glob where * matches zero or more bytes, ? matches one byte,
and \ escapes the following byte.
Regex
Rust byte-regex syntax. The expression is applied directly to key bytes.
Implementations§
Source§impl KeyPattern
impl KeyPattern
Sourcepub fn glob(pattern: impl AsRef<[u8]>) -> KeyPattern
pub fn glob(pattern: impl AsRef<[u8]>) -> KeyPattern
Construct an explicit byte-glob pattern.
Sourcepub fn regex(pattern: impl Into<String>) -> KeyPattern
pub fn regex(pattern: impl Into<String>) -> KeyPattern
Construct an explicit byte-regex pattern.
Trait Implementations§
Source§impl Clone for KeyPattern
impl Clone for KeyPattern
Source§fn clone(&self) -> KeyPattern
fn clone(&self) -> KeyPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyPattern
impl Debug for KeyPattern
Source§impl<'de> Deserialize<'de> for KeyPattern
impl<'de> Deserialize<'de> for KeyPattern
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyPattern, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeyPattern, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyPattern
Source§impl PartialEq for KeyPattern
impl PartialEq for KeyPattern
Source§impl Serialize for KeyPattern
impl Serialize for KeyPattern
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for KeyPattern
Auto Trait Implementations§
impl Freeze for KeyPattern
impl RefUnwindSafe for KeyPattern
impl Send for KeyPattern
impl Sync for KeyPattern
impl Unpin for KeyPattern
impl UnsafeUnpin for KeyPattern
impl UnwindSafe for KeyPattern
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.