Skip to main content

OsStrAnyhow

Trait OsStrAnyhow 

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

Extend std::ffi::OsStr with anyhow methods

Required Methods§

Source

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

Produce a utf8 &str or provide an error describing the string, truncated if long

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl OsStrAnyhow for OsStr

Implementors§