Enum rustix::system::RebootCommand
source · #[non_exhaustive]#[repr(i32)]pub enum RebootCommand {
CadOff = 0,
CadOn = -1_985_229_329,
Halt = -839_974_621,
Kexec = 1_163_412_803,
PowerOff = 1_126_301_404,
Restart = 19_088_743,
SwSuspend = -805_241_630,
}
Expand description
Reboot command for use with reboot
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CadOff = 0
Disables the Ctrl-Alt-Del keystroke.
When disabled, the keystroke will send a Signal::Int
to pid 1.
CadOn = -1_985_229_329
Enables the Ctrl-Alt-Del keystroke.
When enabled, the keystroke will trigger a Restart
.
Halt = -839_974_621
Prints the message “System halted” and halts the system
Kexec = 1_163_412_803
Execute a kernel that has been loaded earlier with kexec_load
.
PowerOff = 1_126_301_404
Prints the message “Power down.”, stops the system, and tries to remove all power
Restart = 19_088_743
Prints the message “Restarting system.” and triggers a restart
SwSuspend = -805_241_630
Hibernate the system by suspending to disk
Trait Implementations§
source§impl Clone for RebootCommand
impl Clone for RebootCommand
source§fn clone(&self) -> RebootCommand
fn clone(&self) -> RebootCommand
Returns a copy of the value. Read more
1.0.0 · 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 RebootCommand
impl Debug for RebootCommand
source§impl PartialEq for RebootCommand
impl PartialEq for RebootCommand
source§fn eq(&self, other: &RebootCommand) -> bool
fn eq(&self, other: &RebootCommand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for RebootCommand
impl Eq for RebootCommand
impl StructuralEq for RebootCommand
impl StructuralPartialEq for RebootCommand
Auto Trait Implementations§
impl RefUnwindSafe for RebootCommand
impl Send for RebootCommand
impl Sync for RebootCommand
impl Unpin for RebootCommand
impl UnwindSafe for RebootCommand
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