pub enum FilterField {
Assignee,
Label,
Status,
Priority,
}Expand description
A selectable structured-filter criterion.
FilterField::ALL is the single ordered field list the filter modal
renders its rows from (risk: field/modal drift) and StructuredFilter
evaluates over — adding a criterion (FR-011) is one more Option<String>
field on StructuredFilter plus one variant / match arm here.
Variants§
Implementations§
Source§impl FilterField
impl FilterField
Sourcepub const ALL: [FilterField; 4]
pub const ALL: [FilterField; 4]
The criteria in modal row order (research D-05).
pub fn label(self) -> &'static str
Sourcepub fn key(self) -> &'static str
pub fn key(self) -> &'static str
The serialized frontmatter key each criterion matches against
(Issue::to_file_contents emits these). Used by diagnostics.
Sourcepub fn row(self) -> usize
pub fn row(self) -> usize
Row index of this criterion in FilterField::ALL.
pub fn next(self) -> Self
pub fn prev(self) -> Self
Sourcepub fn value(self, filter: &StructuredFilter) -> Option<&str>
pub fn value(self, filter: &StructuredFilter) -> Option<&str>
The criterion value when set and non-empty. An empty string is treated as “no criterion” everywhere (canonical invariant), so the filter modal can edit a slot without a live-match surprise.
Sourcepub fn value_mut(self, filter: &mut StructuredFilter) -> &mut String
pub fn value_mut(self, filter: &mut StructuredFilter) -> &mut String
Mutable access to the criterion buffer, materializing an empty one
when the criterion is unset (the filter modal types into it and
StructuredFilter::normalize promotes empty back to None).
Sourcepub fn unset(self, filter: &mut StructuredFilter)
pub fn unset(self, filter: &mut StructuredFilter)
Clear the criterion back to None.
Trait Implementations§
Source§impl Clone for FilterField
impl Clone for FilterField
Source§fn clone(&self) -> FilterField
fn clone(&self) -> FilterField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FilterField
Source§impl Debug for FilterField
impl Debug for FilterField
impl Eq for FilterField
Source§impl PartialEq for FilterField
impl PartialEq for FilterField
impl StructuralPartialEq for FilterField
Auto Trait Implementations§
impl Freeze for FilterField
impl RefUnwindSafe for FilterField
impl Send for FilterField
impl Sync for FilterField
impl Unpin for FilterField
impl UnsafeUnpin for FilterField
impl UnwindSafe for FilterField
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,
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 more