pub struct Finder {
pub seeds: Option<Vec<String>>,
pub matches: Option<Vec<Process>>,
/* private fields */
}Fields§
§seeds: Option<Vec<String>>§matches: Option<Vec<Process>>Implementations§
Source§impl Finder
impl Finder
Sourcepub fn search(&mut self) -> Result<Self, PipelightError>
pub fn search(&mut self) -> Result<Self, PipelightError>
Search matching processes and hydrate struct with matches.
Sourcepub fn search_no_parents(&mut self) -> Result<Self, PipelightError>
pub fn search_no_parents(&mut self) -> Result<Self, PipelightError>
Search matching processes and hydrate struct with matches. Ensure the matching process is not a parent of this one.
Sourcepub fn kill(&self) -> Result<(), PipelightError>
pub fn kill(&self) -> Result<(), PipelightError>
Try to kill matches if any. And stop if one of the processes couldn’t be killed.
When you want to silently fail use:
kill().ok()
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Finder
impl RefUnwindSafe for Finder
impl Send for Finder
impl Sync for Finder
impl Unpin for Finder
impl UnwindSafe for Finder
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<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