pub struct MatchOptions {Show 18 fields
pub pattern: String,
pub full: bool,
pub ignore_case: bool,
pub exact: bool,
pub inverse: bool,
pub newest: bool,
pub oldest: bool,
pub older: Option<f64>,
pub pid: Option<Vec<i32>>,
pub parent: Option<Vec<i32>>,
pub pgroup: Option<Vec<i32>>,
pub group: Option<Vec<u32>>,
pub session: Option<Vec<i32>>,
pub terminal: Option<Vec<String>>,
pub euid: Option<Vec<String>>,
pub uid: Option<Vec<String>>,
pub runstates: Option<Vec<char>>,
pub env: Option<String>,
}Expand description
Bag of filter and matching options. Each field maps to a
command-line flag in pgrep / pkill / skill / snice. None
(or an empty string for pattern) means “no filter for this
category”; multiple-valued fields are OR’d within the category and
AND’d across categories.
Fields§
§pattern: String§full: bool§ignore_case: bool§exact: bool§inverse: bool§newest: bool§oldest: bool§older: Option<f64>§pid: Option<Vec<i32>>§parent: Option<Vec<i32>>§pgroup: Option<Vec<i32>>§group: Option<Vec<u32>>§session: Option<Vec<i32>>§terminal: Option<Vec<String>>§euid: Option<Vec<String>>§uid: Option<Vec<String>>§runstates: Option<Vec<char>>§env: Option<String>--env NAME (any process whose environment has NAME) or
--env NAME=VALUE (NAME must be present with exactly VALUE).
Implementations§
Source§impl MatchOptions
impl MatchOptions
Sourcepub fn has_filter(&self) -> bool
pub fn has_filter(&self) -> bool
True if at least one selector field is set. Used to decide
whether pgrep / pkill can run without an explicit pattern.
Auto Trait Implementations§
impl Freeze for MatchOptions
impl RefUnwindSafe for MatchOptions
impl Send for MatchOptions
impl Sync for MatchOptions
impl Unpin for MatchOptions
impl UnsafeUnpin for MatchOptions
impl UnwindSafe for MatchOptions
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