use serde::Serialize; use std::path::PathBuf; #[derive(Serialize)] pub struct JVPathOutput { pub path: PathBuf, } impl From for JVPathOutput { fn from(path: PathBuf) -> Self { JVPathOutput { path } } } impl From for PathBuf { fn from(jv_path: JVPathOutput) -> Self { jv_path.path } } impl AsRef for JVPathOutput { fn as_ref(&self) -> &PathBuf { &self.path } } impl AsRef for JVPathOutput { fn as_ref(&self) -> &std::path::Path { &self.path } } impl std::ops::Deref for JVPathOutput { type Target = PathBuf; fn deref(&self) -> &Self::Target { &self.path } }