pub struct EncoDecode {
pub hostname: String,
pub pid_map_list: HashMap<i32, PidStatus>,
pub time_epoch: u64,
pub delay: u64,
pub total_cpu_time: u64,
}Expand description
EncodDecode is the struct that we use to hold additional metadata and write to disk as
serialized data of the form let enc encoded: Vec<u8> = bincode::serialize(&encodecode).unwrap();.
Fields§
§hostname: String§pid_map_list: HashMap<i32, PidStatus>Vector of hashmap of pid to the pidstats.
time_epoch: u64The epoch time at which the stats were recorded
delay: u64Can be used for sampling
total_cpu_time: u64The cumilative CPU time in jiffies.
Trait Implementations§
Source§impl Clone for EncoDecode
impl Clone for EncoDecode
Source§fn clone(&self) -> EncoDecode
fn clone(&self) -> EncoDecode
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 EncoDecode
impl Debug for EncoDecode
Source§impl<'de> Deserialize<'de> for EncoDecode
impl<'de> Deserialize<'de> for EncoDecode
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 EncoDecode
impl PartialEq for EncoDecode
Source§impl Serialize for EncoDecode
impl Serialize for EncoDecode
impl StructuralPartialEq for EncoDecode
Auto Trait Implementations§
impl Freeze for EncoDecode
impl RefUnwindSafe for EncoDecode
impl Send for EncoDecode
impl Sync for EncoDecode
impl Unpin for EncoDecode
impl UnwindSafe for EncoDecode
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