(
path: std::path::PathBuf,
)
| 17 | /// Checks if the path is valid UTF-8 and returns it as a [`Utf8NativePathBuf`]. |
| 18 | #[cfg(feature = "std")] |
| 19 | pub fn check_path_buf( |
| 20 | path: std::path::PathBuf, |
| 21 | ) -> Result<typed_path::Utf8PlatformPathBuf, alloc::string::FromUtf8Error> { |
| 22 | typed_path::Utf8PlatformPathBuf::from_bytes_path_buf(typed_path::PlatformPathBuf::from( |
| 23 | path.into_os_string().into_encoded_bytes(), |
| 24 | )) |
| 25 | } |
| 26 | |
| 27 | #[cfg(feature = "serde")] |
| 28 | pub mod unix_path_serde_option { |
no outgoing calls
no test coverage detected