pub struct CategoricalString(pub String);Expand description
Categorical string-valued field. Group reduction takes the
mode (most-frequent value); ties break alphabetically per the
existing aggregate(AggRule::Mode, ...) rule.
policy (SCHED_OTHER, SCHED_FIFO, SCHED_RR, SCHED_BATCH,
SCHED_IDLE, SCHED_DEADLINE, SCHED_EXT) is the only
CategoricalString field on
crate::ctprof::ThreadState. The
state: char and ext_enabled: bool fields stay unwrapped
— the AggRule::ModeChar and AggRule::ModeBool accessors
coerce them through String via to_string() at the call site. If a second
bool-valued metric appears, promote both to a dedicated
CategoricalBool wrapper rather than continuing the ad-hoc
coercion.
Tuple Fields§
§0: StringTrait Implementations§
Source§impl Clone for CategoricalString
impl Clone for CategoricalString
Source§fn clone(&self) -> CategoricalString
fn clone(&self) -> CategoricalString
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CategoricalString
impl Debug for CategoricalString
Source§impl Default for CategoricalString
impl Default for CategoricalString
Source§fn default() -> CategoricalString
fn default() -> CategoricalString
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CategoricalString
impl<'de> Deserialize<'de> for CategoricalString
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 Display for CategoricalString
impl Display for CategoricalString
Source§impl From<&str> for CategoricalString
impl From<&str> for CategoricalString
Source§impl From<CategoricalString> for String
impl From<CategoricalString> for String
Source§fn from(v: CategoricalString) -> Self
fn from(v: CategoricalString) -> Self
Converts to this type from the input type.
Source§impl From<String> for CategoricalString
impl From<String> for CategoricalString
Source§impl Hash for CategoricalString
impl Hash for CategoricalString
Source§impl Modeable for CategoricalString
impl Modeable for CategoricalString
Source§fn mode_across(
items: impl IntoIterator<Item = Self>,
) -> Option<(Self, usize, usize)>
fn mode_across( items: impl IntoIterator<Item = Self>, ) -> Option<(Self, usize, usize)>
Returns
(mode_value, count, total) over the input
iterator, or None when the iterator is empty.Source§impl Ord for CategoricalString
impl Ord for CategoricalString
Source§fn cmp(&self, other: &CategoricalString) -> Ordering
fn cmp(&self, other: &CategoricalString) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CategoricalString
impl PartialEq for CategoricalString
Source§impl PartialOrd for CategoricalString
impl PartialOrd for CategoricalString
Source§impl Serialize for CategoricalString
impl Serialize for CategoricalString
impl Eq for CategoricalString
impl StructuralPartialEq for CategoricalString
Auto Trait Implementations§
impl Freeze for CategoricalString
impl RefUnwindSafe for CategoricalString
impl Send for CategoricalString
impl Sync for CategoricalString
impl Unpin for CategoricalString
impl UnwindSafe for CategoricalString
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<I> IntoResettable<String> for I
impl<I> IntoResettable<String> for I
§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
Convert to the intended resettable type