pub struct CompiledMatchers { /* private fields */ }Expand description
Validated stream matchers compiled for repeated evaluation.
Implementations§
Source§impl CompiledMatchers
impl CompiledMatchers
Sourcepub fn compile(filter: &StreamFilter) -> Result<Self, InvalidFilter>
pub fn compile(filter: &StreamFilter) -> Result<Self, InvalidFilter>
Validate and compile a StreamFilter.
Sourcepub fn matches(&self, key: &[u8], value: &[u8]) -> bool
pub fn matches(&self, key: &[u8], value: &[u8]) -> bool
Return whether both predicates accept an already-resolved entry.
The key predicate runs first, so key-excluded entries avoid the
value-filter scan. Implementations that resolve values lazily must call
Self::matches_key before resolving the value and
Self::matches_value afterward.
Sourcepub fn matches_key(&self, key: &[u8]) -> bool
pub fn matches_key(&self, key: &[u8]) -> bool
Return whether any selector matches the key.
Selector regular expressions evaluate bytes after the matching prefix.
Sourcepub fn selectors(&self) -> &[CompiledSelector]
pub fn selectors(&self) -> &[CompiledSelector]
The compiled selectors in request order.
Sourcepub fn matches_value(&self, value: &[u8]) -> bool
pub fn matches_value(&self, value: &[u8]) -> bool
Return whether the configured value filters match the value.
Values pass when no value filter is configured.
Trait Implementations§
Source§impl Clone for CompiledMatchers
impl Clone for CompiledMatchers
Source§fn clone(&self) -> CompiledMatchers
fn clone(&self) -> CompiledMatchers
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 moreAuto Trait Implementations§
impl Freeze for CompiledMatchers
impl RefUnwindSafe for CompiledMatchers
impl Send for CompiledMatchers
impl Sync for CompiledMatchers
impl Unpin for CompiledMatchers
impl UnsafeUnpin for CompiledMatchers
impl UnwindSafe for CompiledMatchers
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more