Struct HistoryFilter
pub struct HistoryFilter {
pub authors: Vec<String>,
pub entry_kinds: Vec<EntryKind>,
pub time_range: Option<(SystemTime, SystemTime)>,
pub apps: Vec<String>,
pub resource_kinds: Vec<String>,
pub resources: Vec<String>,
pub work_groups: Vec<String>,
pub facets: Vec<ActionFacet>,
pub classification: HistoryClassification,
}Expand description
Empty fields are “match everything” so a freshly-constructed filter behaves like no filter at all. The chrome owns the filter (not the widget) so the host can persist it across remounts, e.g. a workspace switch, without poking at widget internals.
Fields§
Empty = all authors. Matching is case-insensitive so a typeahead “author:alice” filter doesn’t depend on the user guessing the canonical casing.
entry_kinds: Vec<EntryKind>Empty = all op classes.
time_range: Option<(SystemTime, SystemTime)>None disables the range. Half-open, matching the convention
used elsewhere in Tilo so two adjacent filters never double-count
a boundary entry.
apps: Vec<String>App id or label, case-insensitive. Empty means every app, including legacy entries with no app provenance.
resource_kinds: Vec<String>Stable resource kind (files.entry, word-processor.document, …).
resources: Vec<String>Stable resource ids or human labels. Values within this lens are OR.
work_groups: Vec<String>Explicit work-group ids or labels. Values within this lens are OR.
facets: Vec<ActionFacet>Selected browse facets. All selected key/value pairs must match.
classification: HistoryClassificationLets the explorer make legacy/direct edits explicitly browseable instead of silently mixing them into semantic lenses.
Implementations§
§impl HistoryFilter
impl HistoryFilter
pub fn matches(&self, entry: &HistoryEntry) -> bool
pub fn with_entry_kind(self, op: EntryKind) -> HistoryFilter
pub fn with_app(self, app: impl Into<String>) -> HistoryFilter
pub fn with_resource_kind(self, kind: impl Into<String>) -> HistoryFilter
pub fn with_resource(self, resource: impl Into<String>) -> HistoryFilter
pub fn with_work_group(self, group: impl Into<String>) -> HistoryFilter
pub fn with_classification( self, classification: HistoryClassification, ) -> HistoryFilter
pub fn with_facet(self, facet: ActionFacet) -> HistoryFilter
Trait Implementations§
§impl Clone for HistoryFilter
impl Clone for HistoryFilter
§fn clone(&self) -> HistoryFilter
fn clone(&self) -> HistoryFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for HistoryFilter
impl Debug for HistoryFilter
§impl Default for HistoryFilter
impl Default for HistoryFilter
§fn default() -> HistoryFilter
fn default() -> HistoryFilter
§impl PartialEq for HistoryFilter
impl PartialEq for HistoryFilter
impl StructuralPartialEq for HistoryFilter
Auto Trait Implementations§
impl Freeze for HistoryFilter
impl RefUnwindSafe for HistoryFilter
impl Send for HistoryFilter
impl Sync for HistoryFilter
impl Unpin for HistoryFilter
impl UnsafeUnpin for HistoryFilter
impl UnwindSafe for HistoryFilter
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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