(&self, f: &mut fmt::Formatter<'_>)
| 269 | |
| 270 | impl fmt::Display for ShmError { |
| 271 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 272 | match self { |
| 273 | ShmError::SyscallError(msg, errno) => { |
| 274 | write!(f, "Errno: {errno:?} Details: {msg}") |
| 275 | } |
| 276 | ShmError::SegmentNotInitialized(msg) => { |
| 277 | write!(f, "The shared memory segment is not initialized [{msg}].") |
| 278 | } |
| 279 | ShmError::SegmentMalformed(msg) => { |
| 280 | write!( |
| 281 | f, |
| 282 | "The shared memory segment is initialized but malformed [{msg}]." |
| 283 | ) |
| 284 | } |
| 285 | ShmError::CausalityBreach(msg) => { |
| 286 | write!( |
| 287 | f, |
| 288 | "Failed causality check when comparing timestamps [{msg}]." |
| 289 | ) |
| 290 | } |
| 291 | ShmError::SegmentVersionNotSupported(msg) => { |
| 292 | write!( |
| 293 | f, |
| 294 | "The shared memory segment version is not supported [{msg}]." |
| 295 | ) |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | impl Error for ShmError {} |
nothing calls this directly
no outgoing calls
no test coverage detected