blob: 2ddd643c130a87f11a16d125a25b8bd4440347bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
use serde::Serialize;
use std::path::PathBuf;
#[derive(Serialize)]
pub struct JVPathOutput {
pub path: PathBuf,
}
impl From<PathBuf> for JVPathOutput {
fn from(path: PathBuf) -> Self {
JVPathOutput { path }
}
}
impl From<JVPathOutput> for PathBuf {
fn from(jv_path: JVPathOutput) -> Self {
jv_path.path
}
}
impl AsRef<PathBuf> for JVPathOutput {
fn as_ref(&self) -> &PathBuf {
&self.path
}
}
impl AsRef<std::path::Path> 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
}
}
|