fn from_str(os_name: &str) -> Result<Self, Self::Err> {
        let os = match os_name {
            "android" => OS::Android,
            "cuda" => OS::Cuda,
            "dragonfly" => OS::Dragonfly,
            "emscripten" => OS::Emscripten,
            "freebsd" => OS::FreeBSD,
            "fuchsia" => OS::Fuchsia,
            "haiku" => OS::Haiku,
            "hermit" => OS::Hermit,
            "illumos" => OS::Illumos,
            "ios" => OS::iOS,
            "linux" => OS::Linux,
            "macos" => OS::MacOS,
            "netbsd" => OS::NetBSD,
            "openbsd" => OS::OpenBSD,
            "redox" => OS::Redox,
            "solaris" => OS::Solaris,
            "tvos" => OS::TvOS,
            "wasi" => OS::Wasi,
            "windows" => OS::Windows,
            "vxworks" => OS::VxWorks,
            _ => return Err(Error),
        };

        Ok(os)
    }
/// Create a new `Env` from the given string
Create a new `Env` from the given string
Create a new ` Env ` from the given string
fn from_str(os_name: &str) -> Result<Self, Self::Err> {
        let os = match os_name {
            "android" => OS::Android,
            "cuda" => OS::Cuda,
            "dragonfly" => OS::Dragonfly,
            "emscripten" => OS::Emscripten,
            "freebsd" => OS::FreeBSD,
            "fuchsia" => OS::Fuchsia,
            "haiku" => OS::Haiku,
            "hermit" => OS::Hermit,
            "illumos" => OS::Illumos,
            "ios" => OS::iOS,
            "linux" => OS::Linux,
            "macos" => OS::MacOS,
            "netbsd" => OS::NetBSD,
            "openbsd" => OS::OpenBSD,
            "redox" => OS::Redox,
            "solaris" => OS::Solaris,
            "tvos" => OS::TvOS,
            "wasi" => OS::Wasi,
            "windows" => OS::Windows,
            "vxworks" => OS::VxWorks,
            _ => return Err(Error),
        };
        Ok(os)
    }
fn from_str ( os_name : & str ) -> Result < Self , Self :: Err > { let os = match os_name { " " => OS :: Android , " " => OS :: Cuda , " " => OS :: Dragonfly , " " => OS :: Emscripten , " " => OS :: FreeBSD , " " => OS :: Fuchsia , " " => OS :: Haiku , " " => OS :: Hermit , " " => OS :: Illumos , " " => OS :: iOS , " " => OS :: Linux , " " => OS :: MacOS , " " => OS :: NetBSD , " " => OS :: OpenBSD , " " => OS :: Redox , " " => OS :: Solaris , " " => OS :: TvOS , " " => OS :: Wasi , " " => OS :: Windows , " " => OS :: VxWorks , _ => return Err ( Error ) , } ; Ok ( os ) }
Create a new `Env` from the given string
Create a new ` Env ` from the given string
os_name
&str
os_name
&str