typed_path

Type Alias Utf8NativePath

source
pub type Utf8NativePath = Utf8UnixPath;
Expand description

Utf8Path that is native to the platform during compilation

Aliased Type§

struct Utf8NativePath { /* private fields */ }

Trait Implementations§

source§

impl AsRef<Path> for Utf8NativePath

source§

fn as_ref(&self) -> &StdPath

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

use typed_path::Utf8NativePath;
use std::path::Path;

let native_path = Utf8NativePath::new("some_file.txt");
let std_path: &Path = native_path.as_ref();

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