pub struct StartupConfig {
pub name: String,
pub description: String,
pub program: PathBuf,
pub args: Vec<String>,
pub working_directory: Option<PathBuf>,
pub ignore_not_installed: bool,
}Expand description
开机自启的注册配置;三个操作系统共用同一份配置。
Fields§
§name: String自启名称,同时作为 Windows 计划任务名、systemd 单元名与 launchd 标签。
description: String自启描述。
program: PathBuf要启动的可执行文件绝对路径;为空表示当前运行中的可执行文件。
args: Vec<String>启动参数。
working_directory: Option<PathBuf>工作目录;为空表示由系统决定。
ignore_not_installed: bool自启未注册时 start、stop、is_run、restart 与 uninstall 的行为:
为真时直接返回成功或假,为假时返回错误。默认为真,便于把这些操作当作清理手段重复调用。
Implementations§
Trait Implementations§
Source§impl Clone for StartupConfig
impl Clone for StartupConfig
Auto Trait Implementations§
impl Freeze for StartupConfig
impl RefUnwindSafe for StartupConfig
impl Send for StartupConfig
impl Sync for StartupConfig
impl Unpin for StartupConfig
impl UnsafeUnpin for StartupConfig
impl UnwindSafe for StartupConfig
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