(
f: impl FnOnce(&steamworks::Client) -> Result<T, SteamError>,
)
| 135 | |
| 136 | #[cfg(test)] |
| 137 | pub fn is_enabled() -> Result<bool, SteamError> { |
| 138 | state() |
| 139 | .lock() |
| 140 | .map(|state| state.enabled) |
| 141 | .map_err(|_| SteamError::NotReady) |
| 142 | } |
| 143 | |
| 144 | #[cfg(test)] |
| 145 | pub fn is_ready() -> Result<bool, SteamError> { |
| 146 | state() |
| 147 | .lock() |
| 148 | .map(|state| state.client.is_some()) |
| 149 | .map_err(|_| SteamError::NotReady) |
| 150 | } |
| 151 | |
| 152 | #[cfg(test)] |
no test coverage detected