Struct nix::sched::CpuSet [−][src]
#[repr(C)]pub struct CpuSet { /* fields omitted */ }
Expand description
CpuSet represent a bit-mask of CPUs. CpuSets are used by sched_setaffinity and sched_getaffinity for example.
This is a wrapper around libc::cpu_set_t
.
Implementations
impl CpuSet
[src]
impl CpuSet
[src]pub fn is_set(&self, field: usize) -> Result<bool>
[src]
pub fn is_set(&self, field: usize) -> Result<bool>
[src]Test to see if a CPU is in the CpuSet.
field
is the CPU id to test
pub fn set(&mut self, field: usize) -> Result<()>
[src]
pub fn set(&mut self, field: usize) -> Result<()>
[src]Add a CPU to CpuSet.
field
is the CPU id to add
Trait Implementations
impl Copy for CpuSet
[src]
impl Eq for CpuSet
[src]
impl StructuralEq for CpuSet
[src]
impl StructuralPartialEq for CpuSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for CpuSet
impl Send for CpuSet
impl Sync for CpuSet
impl Unpin for CpuSet
impl UnwindSafe for CpuSet
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more