pub struct StatsResult {
pub output: CommandOutput,
pub containers: Vec<String>,
pub parsed_stats: Vec<ContainerStats>,
}
Expand description
Result from the stats command
Fields§
§output: CommandOutput
Raw command output
containers: Vec<String>
Containers that were monitored
parsed_stats: Vec<ContainerStats>
Parsed stats (when JSON format is used)
Implementations§
Source§impl StatsResult
impl StatsResult
Sourcepub fn containers(&self) -> &[String]
pub fn containers(&self) -> &[String]
Get the monitored container names
Sourcepub fn parsed_stats(&self) -> &[ContainerStats]
pub fn parsed_stats(&self) -> &[ContainerStats]
Get parsed stats (available when JSON format is used)
Sourcepub fn raw_output(&self) -> &str
pub fn raw_output(&self) -> &str
Get the raw stats output
Trait Implementations§
Source§impl Clone for StatsResult
impl Clone for StatsResult
Source§fn clone(&self) -> StatsResult
fn clone(&self) -> StatsResult
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 moreAuto Trait Implementations§
impl Freeze for StatsResult
impl RefUnwindSafe for StatsResult
impl Send for StatsResult
impl Sync for StatsResult
impl Unpin for StatsResult
impl UnwindSafe for StatsResult
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