Struct libafl_bolts::core_affinity::CoreId
source · #[repr(transparent)]pub struct CoreId(pub usize);
Expand description
This represents a CPU core.
Tuple Fields§
§0: usize
The numerical id
of a core
Implementations§
source§impl CoreId
impl CoreId
sourcepub fn set_affinity(&self) -> Result<(), Error>
pub fn set_affinity(&self) -> Result<(), Error>
Set the affinity of the current process to this CoreId
Note: This will not fail if the target platform does not support core affinity.
(only on error cases for supported platforms)
If you really need to fail for unsupported platforms (like aarch64
on macOS
), use CoreId::set_affinity_forced
instead.
Trait Implementations§
source§impl<'de> Deserialize<'de> for CoreId
impl<'de> Deserialize<'de> for CoreId
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for CoreId
impl PartialEq for CoreId
impl Copy for CoreId
impl Eq for CoreId
impl StructuralEq for CoreId
impl StructuralPartialEq for CoreId
Auto Trait Implementations§
impl RefUnwindSafe for CoreId
impl Send for CoreId
impl Sync for CoreId
impl Unpin for CoreId
impl UnwindSafe for CoreId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting
TupleList
, of an Prepend::prepend()
call,
including the prepended entry.source§fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.