Enum nix::sys::reboot::RebootMode
source · #[repr(i32)]
#[non_exhaustive]
pub enum RebootMode {
RB_HALT_SYSTEM,
RB_KEXEC,
RB_POWER_OFF,
RB_AUTOBOOT,
RB_SW_SUSPEND,
}
Expand description
How exactly should the system be rebooted.
See set_cad_enabled()
for
enabling/disabling Ctrl-Alt-Delete.
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.
RB_HALT_SYSTEM
Halt the system.
RB_KEXEC
Execute a kernel that has been loaded earlier with
kexec_load(2)
.
RB_POWER_OFF
Stop the system and switch off power, if possible.
RB_AUTOBOOT
Restart the system.
RB_SW_SUSPEND
Suspend the system using software suspend.
Trait Implementations§
source§impl Clone for RebootMode
impl Clone for RebootMode
source§fn clone(&self) -> RebootMode
fn clone(&self) -> RebootMode
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 RebootMode
impl Debug for RebootMode
source§impl Hash for RebootMode
impl Hash for RebootMode
source§impl Ord for RebootMode
impl Ord for RebootMode
source§fn cmp(&self, other: &RebootMode) -> Ordering
fn cmp(&self, other: &RebootMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<RebootMode> for RebootMode
impl PartialEq<RebootMode> for RebootMode
source§fn eq(&self, other: &RebootMode) -> bool
fn eq(&self, other: &RebootMode) -> bool
source§impl PartialOrd<RebootMode> for RebootMode
impl PartialOrd<RebootMode> for RebootMode
source§fn partial_cmp(&self, other: &RebootMode) -> Option<Ordering>
fn partial_cmp(&self, other: &RebootMode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more