pub struct StructuredFilter {
pub assignee: Option<String>,
pub label: Option<String>,
pub status: Option<String>,
pub priority: Option<String>,
}Expand description
Typed, extensible structured filter (FR-007..FR-010, FR-011).
Every criterion is optional; an None/empty criterion narrows nothing.
Criteria match case-insensitively against the serialized corpus text
(the same haystack fuzzy_score runs over), following the existing
fuzzy matcher’s to_lowercase() behavior — this keeps the predicate a
pure, config-independent function of the corpus (WP02 runs in parallel
with WP01 for exactly that reason).
Fields§
§assignee: Option<String>§label: Option<String>§status: Option<String>§priority: Option<String>Implementations§
Source§impl StructuredFilter
impl StructuredFilter
Sourcepub fn criteria(&self) -> impl Iterator<Item = (FilterField, &str)>
pub fn criteria(&self) -> impl Iterator<Item = (FilterField, &str)>
The active (set, non-empty) criteria, in FilterField::ALL order.
Sourcepub fn has_active_criteria(&self) -> bool
pub fn has_active_criteria(&self) -> bool
True when at least one criterion is active. When false the board must render unchanged (no criteria → pass-through).
Sourcepub fn evaluate(&self, haystack: &str) -> bool
pub fn evaluate(&self, haystack: &str) -> bool
AND predicate over the serialized corpus text (FR-012, C-002).
Applies every active criterion; the first miss short-circuits the
entry to false. The caller (WP03’s build_filtered) invokes this
once per corpus entry, giving one linear O(entries) pass (NFR-001)
— haystack is lowercased once and each active criterion is a single
substring contains on that pre-lowered text, with no nested
field×corpus loops.
Matching is case-insensitive and substring-based, consistently across
assignee/label/status/priority, exactly as WP02’s prompt specifies
(T009). The stricter per-criterion “equals”/“contains-in-labels” rules
in contracts/filtering.md would require re-parsing the issue; on the
serialized corpus the substring rule is the single consistent gate.
Trait Implementations§
Source§impl Clone for StructuredFilter
impl Clone for StructuredFilter
Source§fn clone(&self) -> StructuredFilter
fn clone(&self) -> StructuredFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StructuredFilter
impl Debug for StructuredFilter
Source§impl Default for StructuredFilter
impl Default for StructuredFilter
Source§fn default() -> StructuredFilter
fn default() -> StructuredFilter
Source§impl<'de> Deserialize<'de> for StructuredFilter
impl<'de> Deserialize<'de> for StructuredFilter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for StructuredFilter
impl Display for StructuredFilter
impl Eq for StructuredFilter
Source§impl PartialEq for StructuredFilter
impl PartialEq for StructuredFilter
Source§impl Serialize for StructuredFilter
impl Serialize for StructuredFilter
impl StructuralPartialEq for StructuredFilter
Auto Trait Implementations§
impl Freeze for StructuredFilter
impl RefUnwindSafe for StructuredFilter
impl Send for StructuredFilter
impl Sync for StructuredFilter
impl Unpin for StructuredFilter
impl UnsafeUnpin for StructuredFilter
impl UnwindSafe for StructuredFilter
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more