MCPcopy Create free account
hub / github.com/aws/clock-bound / fmt

Method fmt

clock-bound/src/shm.rs:271–298  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

269
270impl 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
301impl Error for ShmError {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected