# Refresh kinds
`RefreshKind` selects what a `System` refreshes. Start from `nothing` and add
only the parts you need, or use `everything`:
```rust,no_run
# fn main() -> Result<(), Box<dyn std::error::Error>> {
use sinf::system::{
CpuRefreshKind, MemoryRefreshKind, ProcessRefreshKind, ProcessesToUpdate,
RefreshKind, System, UpdateKind,
};
let mut sys = System::new_with_specifics(
RefreshKind::nothing()
.with_memory(MemoryRefreshKind::everything())
.with_cpu(CpuRefreshKind::everything())
.with_processes(ProcessRefreshKind::nothing().with_exe(UpdateKind::OnlyIfNotSet)),
)?;
sys.refresh_processes_specifics(
ProcessesToUpdate::All,
true,
ProcessRefreshKind::nothing().with_cmd(UpdateKind::Always),
);
# Ok(())
# }
```
`UpdateKind::OnlyIfNotSet` avoids expensive lookups when the value is already
known; `UpdateKind::Always` forces a refresh. `Disks`, `Networks`, `Users`,
`Groups`, `Components` and `Gpus` use `refresh` directly.