Add Serialize/Deserialize to resource and stat types

Add feature "serde" that derives all resource and statistics types from
Serialize and Deserialize. The feature is turned off by default.

Fixes #54
Fixes #55
Fixes #56

Signed-off-by: Felix Obenhuber <felix@obenhuber.de>
This commit is contained in:
Felix Obenhuber
2021-08-03 09:55:10 +02:00
parent bcb7c6cd54
commit 09499e7614
9 changed files with 50 additions and 4 deletions
+1
View File
@@ -36,6 +36,7 @@ pub struct CpuController {
/// The current state of the control group and its processes.
#[derive(Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Cpu {
/// Reports CPU time statistics.
///