pub struct Sysfs { /* private fields */ }Expand description
Reader for a (possibly simulated) /sys + /proc pair.
Implementations§
Source§impl Sysfs
impl Sysfs
Sourcepub fn with_roots(
sys_root: impl Into<PathBuf>,
proc_root: impl Into<PathBuf>,
) -> Self
pub fn with_roots( sys_root: impl Into<PathBuf>, proc_root: impl Into<PathBuf>, ) -> Self
A simulated tree, used by tests and by --sysroot for debugging a
captured topology from another machine.
Sourcepub fn read_topology(
&self,
process_affinity: Option<CpuSet>,
) -> Result<Topology>
pub fn read_topology( &self, process_affinity: Option<CpuSet>, ) -> Result<Topology>
Build the complete Topology.
process_affinity is passed in rather than read here because it comes
from a syscall, not a file. When None, the online set is assumed,
which is what a fresh process without an inherited mask sees.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sysfs
impl RefUnwindSafe for Sysfs
impl Send for Sysfs
impl Sync for Sysfs
impl Unpin for Sysfs
impl UnsafeUnpin for Sysfs
impl UnwindSafe for Sysfs
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