pub struct PerLogicalCoreData<T> { /* fields omitted */ }
Data with an item per logical core in use by the process.
Creates an empty set of logical core data.
constructor
is called for each defined logical core in logical_cores
; it is passed the logical core's identifier.
Gets the data for a particular logical core.
If the logical core does not exist (or does not have assigned data), returns None; this can happen on Linux if using the SO_INCOMING_CPU socket option, which can map to a CPU not assigned to the process.
Gets the mutable data for a particular logical core.
If the logical core does not exist (or does not have assigned data), returns None; this can happen on Linux if using theSO_INCOMING_CPU
socket option, which can return an index for a CPU not assigned to the process.
Gets the mutable data for a particular logical core; if no data for that core, gets it for the default_logical_core_identifier
.
If the logical core does not exist (or does not have assigned data), returns None; this can happen on Linux if using theSO_INCOMING_CPU
socket option, which can return an index for a CPU not assigned to the process.
pub fn set(&mut self, logical_core_identifier: u16, value: T) | [src] |
Sets the current value, discarding the old one.
Takes the data for a particular logical core.
If the logical core does not exist (or does not have assigned data), returns None; this can happen on Linux if using the SO_INCOMING_CPU socket option, which can map to a CPU not assigned to the process.
Replaces the current value, returning the old one.
Iterates over all entries that are not None
.
Maps from T
to V
assuming that entries with Some()
in them are mappable.
mapper
is called for each defined (ie is Some(T)) logical core in logical_cores
; it is passed the logical core's identifier and the old value.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
Formats the value using the given formatter. Read more
Mutably dereferences the value.
The resulting type after dereferencing.
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation.
Performs the mutable indexing (container[index]
) operation.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static