MCPcopy Create free account
hub / github.com/Wulf/dsync / custom_ioerror_path

Method custom_ioerror_path

src/error.rs:59–68  ·  view source on GitHub ↗

Create a custom [ioError] with this [Error] wrapped around with a [Path] attached

(kind: std::io::ErrorKind, msg: M, path: P)

Source from the content-addressed store, hash-verified

57
58 /// Create a custom [ioError] with this [Error] wrapped around with a [Path] attached
59 pub fn custom_ioerror_path<M, P>(kind: std::io::ErrorKind, msg: M, path: P) -> Self
60 where
61 M: Into<String>,
62 P: AsRef<Path>,
63 {
64 return Self::new(ErrorEnum::IoError(
65 ioError::new(kind, msg.into()),
66 format_path(path.as_ref().to_string_lossy().to_string()),
67 ));
68 }
69
70 pub fn not_a_directory<M, P>(msg: M, path: P) -> Self
71 where

Callers

nothing calls this directly

Calls 1

format_pathFunction · 0.85

Tested by

no test coverage detected