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

Method attach_path_err

src/error.rs:150–158  ·  view source on GitHub ↗
(self, path: P)

Source from the content-addressed store, hash-verified

148
149impl<T> IOErrorToError<T> for std::result::Result<T, std::io::Error> {
150 fn attach_path_err<P: AsRef<Path>>(self, path: P) -> Result<T> {
151 return match self {
152 Ok(v) => Ok(v),
153 Err(e) => Err(crate::Error::new(ErrorEnum::IoError(
154 e,
155 format_path(path.as_ref().to_string_lossy().to_string()),
156 ))),
157 };
158 }
159
160 fn attach_path_msg<P: AsRef<Path>, M: AsRef<str>>(self, path: P, msg: M) -> Result<T> {
161 match self {

Callers 5

generate_filesFunction · 0.80
newMethod · 0.80
writeMethod · 0.80
deleteMethod · 0.80
command_completionsFunction · 0.80

Calls 1

format_pathFunction · 0.85

Tested by

no test coverage detected