Path in naughtyfy::api - Rust
Description: Converts the implemented types to [`OsStr`] using `as_os_str()` method. This is NOT [`std::path::Path`]
Keywords: rust, rustlang, rust-lang, Path

# Trait naughtyfy::api::Path

source ·

    pub trait Path {
        fn as_os_str(&self) -> &OsStr;
    }

Expand description

Converts the implemented types to `OsStr` using `as_os_str()` method.
This is NOT `std::path::Path`

## Example

    let path = std::path::Path::new("/usr/bin");
    let ostr = path.as_os_str();
    assert_eq!(ostr,"/usr/bin");

## Required Methods§

source

#### fn as_os_str(&self) -> &OsStr

## Implementations on Foreign Types§

source§

### impl Path for Path

source§

#### fn as_os_str(&self) -> &OsStr

source§

### impl Path for str

source§

#### fn as_os_str(&self) -> &OsStr

source§

### impl Path for String

source§

#### fn as_os_str(&self) -> &OsStr

## Implementors§