#[non_exhaustive]pub struct DaemonResources {
pub measured_at_ms: Option<u64>,
pub pid: u32,
pub start_time_ms: u64,
pub version: String,
pub resources: Option<ChildResourceUsage>,
pub cpu_last_hour: Option<CpuLastHour>,
}Expand description
The daemon’s own process, excluding CPU of its reaped module children.
Construct with DaemonResources::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.measured_at_ms: Option<u64>Unix-epoch milliseconds of this resource measurement, not the reply time.
pid: u32§start_time_ms: u64§version: String§resources: Option<ChildResourceUsage>§cpu_last_hour: Option<CpuLastHour>Implementations§
Source§impl DaemonResources
impl DaemonResources
Sourcepub fn with_measured_at_ms(self, measured_at_ms: Option<u64>) -> Self
pub fn with_measured_at_ms(self, measured_at_ms: Option<u64>) -> Self
Set or clear the measurement’s Unix-epoch millisecond timestamp.
Sourcepub fn new(pid: u32, start_time_ms: u64, version: impl Into<String>) -> Self
pub fn new(pid: u32, start_time_ms: u64, version: impl Into<String>) -> Self
Identify the daemon without manufacturing resource or hourly readings.
Sourcepub fn with_resources(self, resources: Option<ChildResourceUsage>) -> Self
pub fn with_resources(self, resources: Option<ChildResourceUsage>) -> Self
Set or clear the daemon process’s measured usage.
Sourcepub fn with_cpu_last_hour(self, cpu_last_hour: Option<CpuLastHour>) -> Self
pub fn with_cpu_last_hour(self, cpu_last_hour: Option<CpuLastHour>) -> Self
Set or clear its retained hourly CPU reading.
Trait Implementations§
Source§impl Clone for DaemonResources
impl Clone for DaemonResources
Source§impl Debug for DaemonResources
impl Debug for DaemonResources
Source§impl<'de> Deserialize<'de> for DaemonResources
impl<'de> Deserialize<'de> for DaemonResources
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 PartialEq for DaemonResources
impl PartialEq for DaemonResources
Source§impl Serialize for DaemonResources
impl Serialize for DaemonResources
impl StructuralPartialEq for DaemonResources
Auto Trait Implementations§
impl Forget for DaemonResources
impl Freeze for DaemonResources
impl Move for DaemonResources
impl RefUnwindSafe for DaemonResources
impl Send for DaemonResources
impl Sync for DaemonResources
impl Unpin for DaemonResources
impl UnsafeUnpin for DaemonResources
impl UnwindSafe for DaemonResources
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