pub struct DiskStat {
pub device_name: Option<String>,
pub read_sectors: Option<u64>,
pub read_time_ms: Option<u64>,
pub write_sectors: Option<u64>,
pub write_time_ms: Option<u64>,
pub discard_sectors: Option<u64>,
pub discard_time_ms: Option<u64>,
pub flush_count: Option<u64>,
pub flush_time_ms: Option<u64>,
}
Expand description
Counters from /proc/diskstats.
Fields§
§device_name: Option<String>
§read_sectors: Option<u64>
§read_time_ms: Option<u64>
§write_sectors: Option<u64>
§write_time_ms: Option<u64>
§discard_sectors: Option<u64>
§discard_time_ms: Option<u64>
§flush_count: Option<u64>
§flush_time_ms: Option<u64>
Implementations§
Source§impl DiskStat
impl DiskStat
Sourcepub fn device_name(&self) -> &str
pub fn device_name(&self) -> &str
Returns the value of device_name
, or the default value if device_name
is unset.
Sourcepub fn read_sectors(&self) -> u64
pub fn read_sectors(&self) -> u64
Returns the value of read_sectors
, or the default value if read_sectors
is unset.
Sourcepub fn read_time_ms(&self) -> u64
pub fn read_time_ms(&self) -> u64
Returns the value of read_time_ms
, or the default value if read_time_ms
is unset.
Sourcepub fn write_sectors(&self) -> u64
pub fn write_sectors(&self) -> u64
Returns the value of write_sectors
, or the default value if write_sectors
is unset.
Sourcepub fn write_time_ms(&self) -> u64
pub fn write_time_ms(&self) -> u64
Returns the value of write_time_ms
, or the default value if write_time_ms
is unset.
Sourcepub fn discard_sectors(&self) -> u64
pub fn discard_sectors(&self) -> u64
Returns the value of discard_sectors
, or the default value if discard_sectors
is unset.
Sourcepub fn discard_time_ms(&self) -> u64
pub fn discard_time_ms(&self) -> u64
Returns the value of discard_time_ms
, or the default value if discard_time_ms
is unset.
Sourcepub fn flush_count(&self) -> u64
pub fn flush_count(&self) -> u64
Returns the value of flush_count
, or the default value if flush_count
is unset.
Sourcepub fn flush_time_ms(&self) -> u64
pub fn flush_time_ms(&self) -> u64
Returns the value of flush_time_ms
, or the default value if flush_time_ms
is unset.
Trait Implementations§
Source§impl Message for DiskStat
impl Message for DiskStat
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.