#[non_exhaustive]pub struct SubtreeReading {
pub source: SubtreeSource,
pub memory_bytes: Option<u64>,
pub swap_bytes: Option<u64>,
pub process_count: Option<u64>,
pub reason: Option<String>,
}Expand description
A report-only memory reading of a module’s process container.
Use the constructors rather than struct literals so new fields stay additive.
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.source: SubtreeSource§memory_bytes: Option<u64>§swap_bytes: Option<u64>Absent means swap is not accounted, not zero.
process_count: Option<u64>§reason: Option<String>Implementations§
Source§impl SubtreeReading
impl SubtreeReading
Sourcepub fn cgroup_memory(
memory_bytes: u64,
swap_bytes: Option<u64>,
process_count: u64,
) -> Self
pub fn cgroup_memory( memory_bytes: u64, swap_bytes: Option<u64>, process_count: u64, ) -> Self
Cgroup charges, including page cache, rather than summed resident sets.
Sourcepub fn process_sum(
memory_bytes: u64,
swap_bytes: Option<u64>,
process_count: u64,
) -> Self
pub fn process_sum( memory_bytes: u64, swap_bytes: Option<u64>, process_count: u64, ) -> Self
Sum of process resident sets. Shared pages count once per process.
No container-wide figure could be obtained; never substitutes a PID reading.
Trait Implementations§
Source§impl Clone for SubtreeReading
impl Clone for SubtreeReading
Source§impl Debug for SubtreeReading
impl Debug for SubtreeReading
Source§impl<'de> Deserialize<'de> for SubtreeReading
impl<'de> Deserialize<'de> for SubtreeReading
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 SubtreeReading
Source§impl PartialEq for SubtreeReading
impl PartialEq for SubtreeReading
Source§impl Serialize for SubtreeReading
impl Serialize for SubtreeReading
impl StructuralPartialEq for SubtreeReading
Auto Trait Implementations§
impl Freeze for SubtreeReading
impl RefUnwindSafe for SubtreeReading
impl Send for SubtreeReading
impl Sync for SubtreeReading
impl Unpin for SubtreeReading
impl UnsafeUnpin for SubtreeReading
impl UnwindSafe for SubtreeReading
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