fn from_str(arch_name: &str) -> Result<Self, Self::Err> {
        let arch = match arch_name {
            "aarch64" => Arch::AArch64,
            "arm" => Arch::Arm,
            "asmjs" => Arch::AsmJs,
            "mips" => Arch::Mips,
            "mips64" => Arch::Mips64,
            "msp430" => Arch::Msp430,
            "nvptx64" => Arch::Nvptx64,
            "powerpc" => Arch::PowerPc,
            "powerpc64" => Arch::PowerPc64,
            "riscv" => Arch::RiscV,
            "s390x" => Arch::S390X,
            "sparc" => Arch::Sparc,
            "sparc64" => Arch::Sparc64,
            "thumbv6" => Arch::ThumbV6,
            "thumbv7" => Arch::ThumbV7,
            "wasm32" => Arch::Wasm32,
            "x86" => Arch::X86,
            "x86_64" => Arch::X86_64,
            _ => return Err(Error),
        };

        Ok(arch)
    }
/// Create a new `Arch` from the given string
Create a new `Arch` from the given string
Create a new ` Arch ` from the given string
fn from_str(arch_name: &str) -> Result<Self, Self::Err> {
        let arch = match arch_name {
            "aarch64" => Arch::AArch64,
            "arm" => Arch::Arm,
            "asmjs" => Arch::AsmJs,
            "mips" => Arch::Mips,
            "mips64" => Arch::Mips64,
            "msp430" => Arch::Msp430,
            "nvptx64" => Arch::Nvptx64,
            "powerpc" => Arch::PowerPc,
            "powerpc64" => Arch::PowerPc64,
            "riscv" => Arch::RiscV,
            "s390x" => Arch::S390X,
            "sparc" => Arch::Sparc,
            "sparc64" => Arch::Sparc64,
            "thumbv6" => Arch::ThumbV6,
            "thumbv7" => Arch::ThumbV7,
            "wasm32" => Arch::Wasm32,
            "x86" => Arch::X86,
            "x86_64" => Arch::X86_64,
            _ => return Err(Error),
        };
        Ok(arch)
    }
fn from_str ( arch_name : & str ) -> Result < Self , Self :: Err > { let arch = match arch_name { " " => Arch :: AArch64 , " " => Arch :: Arm , " " => Arch :: AsmJs , " " => Arch :: Mips , " " => Arch :: Mips64 , " " => Arch :: Msp430 , " " => Arch :: Nvptx64 , " " => Arch :: PowerPc , " " => Arch :: PowerPc64 , " " => Arch :: RiscV , " " => Arch :: S390X , " " => Arch :: Sparc , " " => Arch :: Sparc64 , " " => Arch :: ThumbV6 , " " => Arch :: ThumbV7 , " " => Arch :: Wasm32 , " " => Arch :: X86 , " " => Arch :: X86_64 , _ => return Err ( Error ) , } ; Ok ( arch ) }
Create a new `Arch` from the given string
Create a new ` Arch ` from the given string
arch_name
&str
arch_name
&str