pub trait FilePath { // Required methods fn write(&self, msg: String) -> Result<()>; fn read(&self) -> Result<String>; // Provided method fn is_empty(&self) -> Result<bool> { ... } }