#[non_exhaustive]
pub enum ScmpArch {
Show 20 variants Native, X86, X8664, X32, Arm, Aarch64, Mips, Mips64, Mips64N32, Mipsel, Mipsel64, Mipsel64N32, Ppc, Ppc64, Ppc64Le, S390, S390X, Parisc, Parisc64, Riscv64,
}
Expand description

Represents a CPU architecture. Seccomp can restrict syscalls on a per-architecture basis.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Native

The native architecture token

X86

The x86 (32-bit) architecture token

X8664

The x86-64 (64-bit) architecture token

X32

The x32 (32-bit x86_64) architecture token

Arm

The ARM architecture token

Aarch64

The AARCH64 architecture token

Mips

The MIPS architecture token

Mips64

The MIPS (64-bit) architecture token

Mips64N32

The MIPS64N32 architecture token

Mipsel

The MIPSEL architecture token

Mipsel64

The MIPSEL (64-bit) architecture token

Mipsel64N32

The MIPSEL64N32 architecture token

Ppc

The PowerPC architecture token

Ppc64

The PowerPC (64-bit) architecture token

Ppc64Le

The PowerPC64LE architecture token

S390

The S390 architecture token

S390X

The S390X architecture token

Parisc

The PA-RISC hppa architecture token

Parisc64

The PA-RISC (64-bit) hppa architecture token

Riscv64

The RISC-V architecture token

Implementations

Returns the system’s native architecture.

This function corresponds to seccomp_arch_native.

Panics

This function panics if it can not get the native architecture.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Converts string seccomp architecture to ScmpArch.

Arguments
  • arch - A string architecture, e.g. SCMP_ARCH_*.

See the seccomp_arch_add(3) man page for details on valid architecture values.

Errors

If an invalid architecture is specified, an error will be returned.

The associated error which can be returned from parsing.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.