(bytes: &[u8])
| 64 | } |
| 65 | |
| 66 | pub fn from_versioned_bytes(bytes: &[u8]) -> Result<Self, ProjectTreeError> { |
| 67 | let mut decoder = Decoder::new(bytes); |
| 68 | decoder.version(REPO_PATH_VERSION, "RepoPath")?; |
| 69 | let path = Self::new(decoder.bytes()?.to_vec())?; |
| 70 | decoder.finish()?; |
| 71 | Ok(path) |
| 72 | } |
| 73 | |
| 74 | /// Convert a native path without normalization or replacement characters. |
| 75 | #[cfg(unix)] |