#[repr(C)]pub struct TopologySupport { /* private fields */ }Implementations§
Source§impl TopologySupport
impl TopologySupport
pub fn discovery(&self) -> &TopologyDiscoverySupport
Sourcepub fn cpu(&self) -> &TopologyCpuBindSupport
pub fn cpu(&self) -> &TopologyCpuBindSupport
Examples found in repository?
examples/support.rs (line 11)
6fn main() {
7 let topo = Topology::new();
8
9 // Check if Process Binding for CPUs is supported
10 println!("CPU Binding (current process) supported: {}",
11 topo.support().cpu().set_current_process());
12 println!("CPU Binding (any process) supported: {}",
13 topo.support().cpu().set_process());
14
15 // Check if Thread Binding for CPUs is supported
16 println!("CPU Binding (current thread) supported: {}",
17 topo.support().cpu().set_current_thread());
18 println!("CPU Binding (any thread) supported: {}",
19 topo.support().cpu().set_thread());
20
21 // Check if Memory Binding is supported
22 println!("Memory Binding supported: {}",
23 topo.support().memory().set_current_process());
24
25 // Debug Print all the Support Flags
26 println!("All Flags:\n{:?}", topo.support());
27}Sourcepub fn memory(&self) -> &TopologyMemBindSupport
pub fn memory(&self) -> &TopologyMemBindSupport
Examples found in repository?
examples/support.rs (line 23)
6fn main() {
7 let topo = Topology::new();
8
9 // Check if Process Binding for CPUs is supported
10 println!("CPU Binding (current process) supported: {}",
11 topo.support().cpu().set_current_process());
12 println!("CPU Binding (any process) supported: {}",
13 topo.support().cpu().set_process());
14
15 // Check if Thread Binding for CPUs is supported
16 println!("CPU Binding (current thread) supported: {}",
17 topo.support().cpu().set_current_thread());
18 println!("CPU Binding (any thread) supported: {}",
19 topo.support().cpu().set_thread());
20
21 // Check if Memory Binding is supported
22 println!("Memory Binding supported: {}",
23 topo.support().memory().set_current_process());
24
25 // Debug Print all the Support Flags
26 println!("All Flags:\n{:?}", topo.support());
27}Trait Implementations§
Auto Trait Implementations§
impl Freeze for TopologySupport
impl RefUnwindSafe for TopologySupport
impl !Send for TopologySupport
impl !Sync for TopologySupport
impl Unpin for TopologySupport
impl UnwindSafe for TopologySupport
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