#[non_exhaustive]pub struct CpuLastHour {
pub cpu_ms: u64,
pub covered_ms: u64,
pub bound: Option<ResourceBound>,
}Expand description
CPU used between the retained wall-clock samples, not a percentage.
Construct with CpuLastHour::new and its builders, not a struct literal.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cpu_ms: u64§covered_ms: u64§bound: Option<ResourceBound>Only the covered hour is a floor; cumulative CPU has a separate bound.
Implementations§
Source§impl CpuLastHour
impl CpuLastHour
Sourcepub fn new(cpu_ms: u64, covered_ms: u64) -> Self
pub fn new(cpu_ms: u64, covered_ms: u64) -> Self
Create an hourly sample total without a CPU lower-bound marker.
Sourcepub fn with_bound(self, bound: Option<ResourceBound>) -> Self
pub fn with_bound(self, bound: Option<ResourceBound>) -> Self
Set or clear the covered hour’s CPU lower-bound marker.
Trait Implementations§
Source§impl Clone for CpuLastHour
impl Clone for CpuLastHour
Source§impl Debug for CpuLastHour
impl Debug for CpuLastHour
Source§impl<'de> Deserialize<'de> for CpuLastHour
impl<'de> Deserialize<'de> for CpuLastHour
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
impl Eq for CpuLastHour
Source§impl PartialEq for CpuLastHour
impl PartialEq for CpuLastHour
Source§impl Serialize for CpuLastHour
impl Serialize for CpuLastHour
impl StructuralPartialEq for CpuLastHour
Auto Trait Implementations§
impl Forget for CpuLastHour
impl Freeze for CpuLastHour
impl Move for CpuLastHour
impl RefUnwindSafe for CpuLastHour
impl Send for CpuLastHour
impl Sync for CpuLastHour
impl Unpin for CpuLastHour
impl UnsafeUnpin for CpuLastHour
impl UnwindSafe for CpuLastHour
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