resolved_pathbuf/
std_impl.rs1use std::borrow::Borrow;
2use std::path::{Path, PathBuf};
3use std::fmt::Debug;
4use std::hash::Hash;
5
6use crate::ResolvedPathBuf;
7
8impl AsRef<Path> for ResolvedPathBuf {
9 fn as_ref(&self) -> &Path {
10 self.resolved.as_path()
11 }
12}
13
14impl Debug for ResolvedPathBuf {
15 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16 self.resolved.fmt(f)
17 }
18}
19
20impl Hash for ResolvedPathBuf {
21 fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
22 self.resolved.hash(state)
23 }
24}
25
26impl Eq for ResolvedPathBuf {}
27
28impl PartialEq for ResolvedPathBuf {
29 fn eq(&self, other: &Self) -> bool {
30 self.resolved.eq(&other.resolved)
31 }
32}
33
34impl Ord for ResolvedPathBuf {
35 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
36 self.resolved.cmp(&other.resolved)
37 }
38}
39
40impl PartialOrd for ResolvedPathBuf {
41 fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
42 self.resolved.partial_cmp(&other.resolved)
43 }
44}
45
46impl Borrow<PathBuf> for ResolvedPathBuf {
47 fn borrow(&self) -> &PathBuf {
48 &self.resolved
49 }
50}
51