Type Alias typed_path::Utf8NativePathBuf

source ·
pub type Utf8NativePathBuf = Utf8UnixPathBuf;
Expand description

Utf8PathBuf that is native to the platform during compilation

Aliased Type§

struct Utf8NativePathBuf { /* private fields */ }

Trait Implementations§

source§

impl AsRef<Path> for Utf8NativePathBuf

source§

fn as_ref(&self) -> &StdPath

Converts a native utf8 pathbuf (based on compilation family) into std::path::Path.

use typed_path::Utf8NativePathBuf;
use std::path::Path;

let native_path_buf = Utf8NativePathBuf::from("some_file.txt");
let std_path: &Path = native_path_buf.as_ref();

assert_eq!(std_path, Path::new("some_file.txt"));