pub struct FilterTarget { /* private fields */ }Expand description
The executable, process, or service selected by a filter.
The representation is intentionally opaque. Executable paths are made absolute exactly once during construction, so a later working-directory change cannot alter the identity used to remove the filter.
Implementations§
Source§impl FilterTarget
impl FilterTarget
Sourcepub fn executable(path: impl Into<PathBuf>) -> Result<Self>
pub fn executable(path: impl Into<PathBuf>) -> Result<Self>
Creates a validated executable-path target.
Sourcepub const fn process(process: ProcessIdentity) -> Self
pub const fn process(process: ProcessIdentity) -> Self
Creates a process target.
Sourcepub fn service(name: impl Into<OsString>) -> Result<Self>
pub fn service(name: impl Into<OsString>) -> Result<Self>
Creates a validated service-short-name target.
Sourcepub fn as_executable(&self) -> Option<&Path>
pub fn as_executable(&self) -> Option<&Path>
Returns the absolute executable path for an executable filter.
Sourcepub const fn as_process(&self) -> Option<ProcessIdentity>
pub const fn as_process(&self) -> Option<ProcessIdentity>
Returns the process identity for a process filter.
Sourcepub fn as_service(&self) -> Option<&OsStr>
pub fn as_service(&self) -> Option<&OsStr>
Returns the service short name for a service filter.
Trait Implementations§
Source§impl Clone for FilterTarget
impl Clone for FilterTarget
Source§fn clone(&self) -> FilterTarget
fn clone(&self) -> FilterTarget
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 FilterTarget
impl Debug for FilterTarget
impl Eq for FilterTarget
Source§impl Hash for FilterTarget
impl Hash for FilterTarget
Source§impl PartialEq for FilterTarget
impl PartialEq for FilterTarget
impl StructuralPartialEq for FilterTarget
Auto Trait Implementations§
impl Freeze for FilterTarget
impl RefUnwindSafe for FilterTarget
impl Send for FilterTarget
impl Sync for FilterTarget
impl Unpin for FilterTarget
impl UnsafeUnpin for FilterTarget
impl UnwindSafe for FilterTarget
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