The approach in this crate is you don't change any thing in your production code but directly mock functions such as std, reqwest and etc. // Production code use std::fs; pub fn claim_slot() -> Result<(), String> { fs::create_dir_all("/var/run/dispatcher") . map_err(|error| format!
Source: [Hacker News](https://github.com/XTSoftwareLabs/shimforge)