pub struct ApplicationRestartOptions { /* private fields */ }Expand description
Command-line arguments and positive restart policies for this application.
The executable name must not be included. The default permits restart after every supported reason.
Implementations§
Source§impl ApplicationRestartOptions
impl ApplicationRestartOptions
Sourcepub fn new(arguments: impl Into<OsString>) -> Self
pub fn new(arguments: impl Into<OsString>) -> Self
Creates options with the supplied restart arguments and all reasons enabled.
Sourcepub fn with_arguments(self, arguments: impl Into<OsString>) -> Self
pub fn with_arguments(self, arguments: impl Into<OsString>) -> Self
Replaces the restart arguments.
Sourcepub const fn with_restart_on_crash(self, enabled: bool) -> Self
pub const fn with_restart_on_crash(self, enabled: bool) -> Self
Chooses whether restart is allowed after an unhandled crash.
Sourcepub const fn with_restart_on_hang(self, enabled: bool) -> Self
pub const fn with_restart_on_hang(self, enabled: bool) -> Self
Chooses whether restart is allowed after an application hang.
Sourcepub const fn with_restart_on_update(self, enabled: bool) -> Self
pub const fn with_restart_on_update(self, enabled: bool) -> Self
Chooses whether restart is allowed after an update.
Sourcepub const fn with_restart_on_reboot(self, enabled: bool) -> Self
pub const fn with_restart_on_reboot(self, enabled: bool) -> Self
Chooses whether restart is allowed after a system reboot.
Sourcepub const fn restart_on_crash(&self) -> bool
pub const fn restart_on_crash(&self) -> bool
Returns whether crash restart is allowed.
Sourcepub const fn restart_on_hang(&self) -> bool
pub const fn restart_on_hang(&self) -> bool
Returns whether hang restart is allowed.
Sourcepub const fn restart_on_update(&self) -> bool
pub const fn restart_on_update(&self) -> bool
Returns whether update restart is allowed.
Sourcepub const fn restart_on_reboot(&self) -> bool
pub const fn restart_on_reboot(&self) -> bool
Returns whether reboot restart is allowed.
Trait Implementations§
Source§impl Clone for ApplicationRestartOptions
impl Clone for ApplicationRestartOptions
Source§fn clone(&self) -> ApplicationRestartOptions
fn clone(&self) -> ApplicationRestartOptions
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 ApplicationRestartOptions
impl Debug for ApplicationRestartOptions
Source§impl Default for ApplicationRestartOptions
impl Default for ApplicationRestartOptions
impl Eq for ApplicationRestartOptions
impl StructuralPartialEq for ApplicationRestartOptions
Auto Trait Implementations§
impl Freeze for ApplicationRestartOptions
impl RefUnwindSafe for ApplicationRestartOptions
impl Send for ApplicationRestartOptions
impl Sync for ApplicationRestartOptions
impl Unpin for ApplicationRestartOptions
impl UnsafeUnpin for ApplicationRestartOptions
impl UnwindSafe for ApplicationRestartOptions
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