#[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
sourceimpl Clone for RebootMode
impl Clone for RebootMode
sourcefn clone(&self) -> RebootMode
fn clone(&self) -> RebootMode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RebootMode
impl Debug for RebootMode
sourceimpl Hash for RebootMode
impl Hash for RebootMode
sourceimpl Ord for RebootMode
impl Ord for RebootMode
sourcefn cmp(&self, other: &RebootMode) -> Ordering
fn cmp(&self, other: &RebootMode) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<RebootMode> for RebootMode
impl PartialEq<RebootMode> for RebootMode
sourcefn eq(&self, other: &RebootMode) -> bool
fn eq(&self, other: &RebootMode) -> bool
sourceimpl PartialOrd<RebootMode> for RebootMode
impl PartialOrd<RebootMode> for RebootMode
sourcefn partial_cmp(&self, other: &RebootMode) -> Option<Ordering>
fn partial_cmp(&self, other: &RebootMode) -> Option<Ordering>
1.0.0 · sourcefn 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 moreimpl Copy for RebootMode
impl Eq for RebootMode
impl StructuralEq for RebootMode
impl StructuralPartialEq for RebootMode
Auto Trait Implementations
impl RefUnwindSafe for RebootMode
impl Send for RebootMode
impl Sync for RebootMode
impl Unpin for RebootMode
impl UnwindSafe for RebootMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more