ToUtf8

Trait ToUtf8 

Source
pub trait ToUtf8 {
    // Required method
    fn to_utf8(&self) -> Result<&str>;
}
Expand description

This has been adapted from cross-rs file.rs source https://github.com/cross-rs/cross/blob/4090beca3cfffa44371a5bba524de3a578aa46c3/src/file.rs#L12

Required Methods§

Source

fn to_utf8(&self) -> Result<&str>

Implementations on Foreign Types§

Source§

impl ToUtf8 for OsStr

Implement ToUtf8 for OsStr

Source§

fn to_utf8(&self) -> Result<&str>

Convert OsStr to &str This function will return an error if the conversion fails

Source§

impl ToUtf8 for Path

Implement ToUtf8 for Path

Source§

fn to_utf8(&self) -> Result<&str>

Convert Path to &str

Implementors§