pub struct FilterDraft {
pub from: String,
pub to: String,
pub owner: String,
pub status: String,
pub labels: String,
pub query: String,
pub field: usize,
}Expand description
The normalized filter editor: one text row per criterion, in the DTO’s own field order.
The DTO the draft normalizes into is RoadmapFilter; the labels are a
comma-separated list in this control only, normalized to the DTO’s
Vec<String> on apply.
Fields§
§from: StringThe period_from row.
to: StringThe period_to row.
owner: StringThe owner row.
status: StringThe status row.
labels: StringThe labels row, comma-separated.
query: StringThe query row.
field: usizeThe focused row.
Implementations§
Source§impl FilterDraft
impl FilterDraft
Sourcepub const ROWS: [&'static str; 6]
pub const ROWS: [&'static str; 6]
The rows in display order; index is Self::field.
Sourcepub fn from_filter(filter: &RoadmapFilter) -> Self
pub fn from_filter(filter: &RoadmapFilter) -> Self
Seed the editor from an installed filter.
Sourcepub fn to_filter(&self) -> RoadmapFilter
pub fn to_filter(&self) -> RoadmapFilter
Normalize the draft into the one filter DTO (contract §Normalized
filter). A blank row is None/empty; labels splits on , and trims.
Trait Implementations§
Source§impl Clone for FilterDraft
impl Clone for FilterDraft
Source§impl Debug for FilterDraft
impl Debug for FilterDraft
Source§impl Default for FilterDraft
impl Default for FilterDraft
impl Eq for FilterDraft
Source§impl PartialEq for FilterDraft
impl PartialEq for FilterDraft
impl StructuralPartialEq for FilterDraft
Auto Trait Implementations§
impl Freeze for FilterDraft
impl RefUnwindSafe for FilterDraft
impl Send for FilterDraft
impl Sync for FilterDraft
impl Unpin for FilterDraft
impl UnsafeUnpin for FilterDraft
impl UnwindSafe for FilterDraft
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
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> ⓘ
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