Enum sysinfo::UpdateKind
source · pub enum UpdateKind {
Never,
Always,
OnlyIfNotSet,
}
Expand description
This enum allows you to specify when you want the related information to be updated.
For example if you only want the Process::exe()
information to be refreshed only if it’s not
already set:
use sysinfo::{ProcessesToUpdate, ProcessRefreshKind, System, UpdateKind};
let mut system = System::new();
system.refresh_processes_specifics(
ProcessesToUpdate::All,
ProcessRefreshKind::new().with_exe(UpdateKind::OnlyIfNotSet),
);
Variants§
Never
Never update the related information.
Always
Always update the related information.
OnlyIfNotSet
Only update the related information if it was not already set at least once.
Trait Implementations§
source§impl Clone for UpdateKind
impl Clone for UpdateKind
source§fn clone(&self) -> UpdateKind
fn clone(&self) -> UpdateKind
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UpdateKind
impl Debug for UpdateKind
source§impl Default for UpdateKind
impl Default for UpdateKind
source§fn default() -> UpdateKind
fn default() -> UpdateKind
Returns the “default value” for a type. Read more
source§impl PartialEq for UpdateKind
impl PartialEq for UpdateKind
impl Copy for UpdateKind
impl Eq for UpdateKind
impl StructuralPartialEq for UpdateKind
Auto Trait Implementations§
impl Freeze for UpdateKind
impl RefUnwindSafe for UpdateKind
impl Send for UpdateKind
impl Sync for UpdateKind
impl Unpin for UpdateKind
impl UnwindSafe for UpdateKind
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more