Sha256: a934fde7a75fb22c0756269b76241924ae1770cd3fbc0daa733c251c6d81113e
Contents?: true
Size: 427 Bytes
Versions: 1
Compression:
Stored size: 427 Bytes
Contents
use std::str::FromStr; #[derive(Clone, Debug)] pub struct Configuration { pub time_mode: TimeMode, } #[derive(Clone, Debug)] pub enum TimeMode { CpuTime, WallTime, } impl FromStr for TimeMode { type Err = (); fn from_str(s: &str) -> Result<Self, Self::Err> { match s { "cpu" => Ok(Self::CpuTime), "wall" => Ok(Self::WallTime), _ => Err(()), } } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pf2-0.2.0 | ext/pf2/src/signal_scheduler/configuration.rs |