pub enum Exe {
Any,
Name(ExeName),
Steam(SteamApp),
}Expand description
The executable a rule matches: every process, the processes whose image basename is a name, compared ASCII-case-insensitively, or the processes with a Steam app id.
Variants§
Any
*: every process.
Name(ExeName)
The processes with this image basename.
Steam(SteamApp)
steam:<appid>: the processes with this Steam app id, whatever their
image basename.
Implementations§
Source§impl Exe
impl Exe
Sourcepub fn new(text: impl Into<String>) -> Result<Self, FieldError>
pub fn new(text: impl Into<String>) -> Result<Self, FieldError>
The exe that text names: * is Exe::Any, steam: in any case
and a decimal app id Exe::Steam, anything else the basename as
written. A basename cannot hold a :, so no program is left out.
§Errors
FieldError::MissingExe for an empty text, FieldError::Nul
for one with a NUL, FieldError::BadSteamApp for a steam: that
no app id follows: nothing, anything but ASCII digits, 0 or a value
over u32::MAX.
Sourcepub const fn is_steam_app(&self) -> bool
pub const fn is_steam_app(&self) -> bool
Whether this is Exe::Steam.
Trait Implementations§
impl Eq for Exe
impl StructuralPartialEq for Exe
Auto Trait Implementations§
impl Freeze for Exe
impl RefUnwindSafe for Exe
impl Send for Exe
impl Sync for Exe
impl Unpin for Exe
impl UnsafeUnpin for Exe
impl UnwindSafe for Exe
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