Skip to main content

oxilean_runtime/io_runtime/
iostats_traits.rs

1//! # IoStats - Trait Implementations
2//!
3//! This module contains trait implementations for `IoStats`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::IoStats;
12use std::fmt;
13
14impl fmt::Display for IoStats {
15    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16        writeln!(f, "I/O Statistics:")?;
17        writeln!(f, "  File reads:       {}", self.file_reads)?;
18        writeln!(f, "  File writes:      {}", self.file_writes)?;
19        writeln!(f, "  Console outputs:  {}", self.console_outputs)?;
20        writeln!(f, "  Console inputs:   {}", self.console_inputs)?;
21        writeln!(f, "  Exceptions thrown: {}", self.exceptions_thrown)?;
22        writeln!(f, "  Exceptions caught: {}", self.exceptions_caught)?;
23        writeln!(f, "  Refs created:     {}", self.refs_created)?;
24        writeln!(f, "  Bytes read:       {}", self.bytes_read)?;
25        writeln!(f, "  Bytes written:    {}", self.bytes_written)
26    }
27}