pub struct ProcessQuery { /* private fields */ }Expand description
Which processes to find. All criteria that are set must hold. Built with the methods below; at least one criterion is required.
Implementations§
Source§impl ProcessQuery
impl ProcessQuery
pub fn new() -> Self
Sourcepub fn exe(self, path: impl Into<PathBuf>) -> Self
pub fn exe(self, path: impl Into<PathBuf>) -> Self
The process runs exactly this executable (compared case-insensitively on Windows).
Sourcepub fn arg(self, token: impl Into<OsString>) -> Self
pub fn arg(self, token: impl Into<OsString>) -> Self
Some element of the command line (the program name included) equals token exactly.
May be given more than once: each token must be present.
Sourcepub fn arg_containing(self, needle: impl Into<String>) -> Self
pub fn arg_containing(self, needle: impl Into<String>) -> Self
Some single element of the command line contains needle (case-sensitive; the program
name included). May be given more than once: each needle must be found, in any element.
Trait Implementations§
Source§impl Clone for ProcessQuery
impl Clone for ProcessQuery
Source§impl Debug for ProcessQuery
impl Debug for ProcessQuery
Source§impl Default for ProcessQuery
impl Default for ProcessQuery
impl Eq for ProcessQuery
Source§impl PartialEq for ProcessQuery
impl PartialEq for ProcessQuery
impl StructuralPartialEq for ProcessQuery
Auto Trait Implementations§
impl Freeze for ProcessQuery
impl RefUnwindSafe for ProcessQuery
impl Send for ProcessQuery
impl Sync for ProcessQuery
impl Unpin for ProcessQuery
impl UnsafeUnpin for ProcessQuery
impl UnwindSafe for ProcessQuery
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