Skip to main content

FromStableEncoding

Trait FromStableEncoding 

Source
pub trait FromStableEncoding {
    // Required method
    unsafe fn from_stable_encoding<'a>(
        encoded: impl Into<Cow<'a, [EncodingWidth]>>,
    ) -> Self;
}
Expand description

Converts an OsString from an encoding that is stable across rust compiler versions, bypassing data copies if possible

Required Methods§

Source

unsafe fn from_stable_encoding<'a>( encoded: impl Into<Cow<'a, [EncodingWidth]>>, ) -> Self

Converts an OsString from an encoding that is stable across rust compiler versions, bypassing data copies if possible

§Safety

The given bytes must be compatible with the underlying of the platform’s OsStr encoding (reminder: this crate only make it safe to pass data between different rust versions)

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FromStableEncoding for OsString

Source§

unsafe fn from_stable_encoding<'a>( encoded: impl Into<Cow<'a, [EncodingWidth]>>, ) -> Self

Implementors§