pub struct PlainPattern { /* private fields */ }Expand description
A literal, case-insensitive substring pattern.
Implementations§
Source§impl PlainPattern
impl PlainPattern
Sourcepub fn new(query: &str) -> Option<Self>
pub fn new(query: &str) -> Option<Self>
Builds a pattern, or None when query is empty.
Only a completely empty query means “no filter”. Whitespace is not
trimmed: a trailing space is a meaningful way to distinguish rustc from
rustcx, and silently editing the user’s query would make the same
keystrokes produce different results depending on hidden rules.
Sourcepub fn matches_text(&self, haystack: &str) -> bool
pub fn matches_text(&self, haystack: &str) -> bool
Whether haystack contains this pattern, ignoring case.
Sourcepub fn matches_number(&self, value: u32) -> bool
pub fn matches_number(&self, value: u32) -> bool
Whether the decimal rendering of value contains this pattern.
Sourcepub fn matches_process(&self, process: &ProcessSnapshot) -> bool
pub fn matches_process(&self, process: &ProcessSnapshot) -> bool
Whether any of the four §7.2 fields of process match.
The user field is matched on the text the USER column shows — the
resolved name when there is one, the uid otherwise — so what matches is
what the user can see.
Trait Implementations§
Source§impl Clone for PlainPattern
impl Clone for PlainPattern
Source§fn clone(&self) -> PlainPattern
fn clone(&self) -> PlainPattern
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 moreSource§impl Debug for PlainPattern
impl Debug for PlainPattern
Source§impl Display for PlainPattern
impl Display for PlainPattern
impl Eq for PlainPattern
Source§impl PartialEq for PlainPattern
impl PartialEq for PlainPattern
impl StructuralPartialEq for PlainPattern
Auto Trait Implementations§
impl Freeze for PlainPattern
impl RefUnwindSafe for PlainPattern
impl Send for PlainPattern
impl Sync for PlainPattern
impl Unpin for PlainPattern
impl UnsafeUnpin for PlainPattern
impl UnwindSafe for PlainPattern
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