pub enum ProcessesToUpdate<'a> {
All,
Some(&'a [Pid]),
}
Expand description
This enum allows you to specify if you want all processes to be updated or just some of them.
Example:
use sysinfo::{ProcessesToUpdate, System, get_current_pid};
let mut system = System::new();
// To refresh all processes:
system.refresh_processes(ProcessesToUpdate::All, true);
// To refresh only the current one:
system.refresh_processes(
ProcessesToUpdate::Some(&[get_current_pid().unwrap()]),
true,
);
Variants§
Trait Implementations§
Source§impl<'a> Clone for ProcessesToUpdate<'a>
impl<'a> Clone for ProcessesToUpdate<'a>
Source§fn clone(&self) -> ProcessesToUpdate<'a>
fn clone(&self) -> ProcessesToUpdate<'a>
Returns a duplicate 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<'a> Debug for ProcessesToUpdate<'a>
impl<'a> Debug for ProcessesToUpdate<'a>
Source§impl<'a> PartialEq for ProcessesToUpdate<'a>
impl<'a> PartialEq for ProcessesToUpdate<'a>
impl<'a> Copy for ProcessesToUpdate<'a>
impl<'a> Eq for ProcessesToUpdate<'a>
impl<'a> StructuralPartialEq for ProcessesToUpdate<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProcessesToUpdate<'a>
impl<'a> RefUnwindSafe for ProcessesToUpdate<'a>
impl<'a> Send for ProcessesToUpdate<'a>
impl<'a> Sync for ProcessesToUpdate<'a>
impl<'a> Unpin for ProcessesToUpdate<'a>
impl<'a> UnwindSafe for ProcessesToUpdate<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
All
: 0 bytesSome
: 16 bytes