pub struct PriorityDistribution {
pub critical_frames: u64,
pub high_frames: u64,
pub medium_frames: u64,
pub low_frames: u64,
pub background_frames: u64,
}Expand description
Distribution of frames by priority level
Fields§
§critical_frames: u64Number of critical priority frames
high_frames: u64Number of high priority frames
medium_frames: u64Number of medium priority frames
low_frames: u64Number of low priority frames
background_frames: u64Number of background priority frames
Implementations§
Source§impl PriorityDistribution
impl PriorityDistribution
Sourcepub fn new() -> PriorityDistribution
pub fn new() -> PriorityDistribution
Create new empty distribution
Sourcepub fn total_frames(&self) -> u64
pub fn total_frames(&self) -> u64
Get total frames count
Sourcepub fn as_percentages(&self) -> PriorityPercentages
pub fn as_percentages(&self) -> PriorityPercentages
Convert to percentages (0.0-1.0)
Sourcepub fn from_counts(
critical_count: u64,
high_count: u64,
medium_count: u64,
low_count: u64,
background_count: u64,
) -> PriorityDistribution
pub fn from_counts( critical_count: u64, high_count: u64, medium_count: u64, low_count: u64, background_count: u64, ) -> PriorityDistribution
Convert from count-based version
Trait Implementations§
Source§impl Clone for PriorityDistribution
impl Clone for PriorityDistribution
Source§fn clone(&self) -> PriorityDistribution
fn clone(&self) -> PriorityDistribution
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 PriorityDistribution
impl Debug for PriorityDistribution
Source§impl Default for PriorityDistribution
impl Default for PriorityDistribution
Source§fn default() -> PriorityDistribution
fn default() -> PriorityDistribution
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PriorityDistribution
impl<'de> Deserialize<'de> for PriorityDistribution
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PriorityDistribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PriorityDistribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PriorityDistribution
impl PartialEq for PriorityDistribution
Source§impl Serialize for PriorityDistribution
impl Serialize for PriorityDistribution
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PriorityDistribution
Auto Trait Implementations§
impl Freeze for PriorityDistribution
impl RefUnwindSafe for PriorityDistribution
impl Send for PriorityDistribution
impl Sync for PriorityDistribution
impl Unpin for PriorityDistribution
impl UnwindSafe for PriorityDistribution
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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