pub enum Hotness {
Hot,
Cold,
Unknown,
}Expand description
What a hotness question can answer.
Three answers rather than two, because the third one is real. Section 11.4 is specific that a consumer has to handle it explicitly rather than folding it into either of the others, and the two directions it could be folded are both wrong: treating unknown as hot puts cold code in the hot section, and treating it as cold puts the hot path there instead.
Variants§
Hot
It runs often enough to spend on.
Cold
It does not.
Unknown
There is no data that answers this, and there is no defensible guess either.
Trait Implementations§
impl Copy for Hotness
impl Eq for Hotness
Source§impl Ord for Hotness
impl Ord for Hotness
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Hotness
impl PartialOrd for Hotness
impl StructuralPartialEq for Hotness
Auto Trait Implementations§
impl Freeze for Hotness
impl RefUnwindSafe for Hotness
impl Send for Hotness
impl Sync for Hotness
impl Unpin for Hotness
impl UnsafeUnpin for Hotness
impl UnwindSafe for Hotness
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