Skip to main content

OsStrExt

Trait OsStrExt 

Source
pub trait OsStrExt {
    // Required method
    fn try_as_bytes(&self) -> Option<&[u8]>;
}
Expand description

Extended functionality for OsStr.

Required Methods§

Source

fn try_as_bytes(&self) -> Option<&[u8]>

Attempts to retrieve the underlying bytes of self.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl OsStrExt for OsStr

Source§

fn try_as_bytes(&self) -> Option<&[u8]>

Implementors§