#[non_exhaustive]pub enum NodeJsArch {
X64,
X86,
Arm64,
Armv6l,
Armv7l,
Ppc64,
Ppc64le,
S390x,
}Expand description
The CPU architecture a Node.js distributable targets
Non-exhaustive: Node.js has added and removed target architectures over time, so new variants may appear in a minor release
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.
X64
64-bit x86 (x64)
X86
32-bit x86 (x86)
Arm64
64-bit ARM (arm64)
Armv6l
32-bit ARMv6 with hardware floating point (armv6l) - shipped up to
Node.js v11
Armv7l
32-bit ARMv7 with hardware floating point (armv7l) - shipped up to
Node.js v23
Ppc64
64-bit PowerPC, big-endian (ppc64)
Ppc64le
64-bit PowerPC, little-endian (ppc64le)
S390x
64-bit IBM Z (s390x)
Implementations§
Source§impl NodeJsArch
impl NodeJsArch
Sourcepub fn new() -> NodeJsArch
pub fn new() -> NodeJsArch
Sourcepub fn from_env() -> Result<NodeJsArch, NodeJsRelInfoError>
pub fn from_env() -> Result<NodeJsArch, NodeJsRelInfoError>
Determines the architecture of the current environment via
std::env::consts::ARCH
§Errors
Returns NodeJsRelInfoError::UnrecognizedArch when the current
architecture has no corresponding Node.js distributable
Trait Implementations§
Source§impl Clone for NodeJsArch
impl Clone for NodeJsArch
Source§fn clone(&self) -> NodeJsArch
fn clone(&self) -> NodeJsArch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NodeJsArch
Source§impl Debug for NodeJsArch
impl Debug for NodeJsArch
Source§impl Default for NodeJsArch
impl Default for NodeJsArch
Source§fn default() -> NodeJsArch
fn default() -> NodeJsArch
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NodeJsArch
impl<'de> Deserialize<'de> for NodeJsArch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NodeJsArch
impl Display for NodeJsArch
impl Eq for NodeJsArch
Source§impl FromStr for NodeJsArch
impl FromStr for NodeJsArch
Source§type Err = NodeJsRelInfoError
type Err = NodeJsRelInfoError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<NodeJsArch, NodeJsRelInfoError>
fn from_str(s: &str) -> Result<NodeJsArch, NodeJsRelInfoError>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for NodeJsArch
impl Hash for NodeJsArch
Source§impl PartialEq for NodeJsArch
impl PartialEq for NodeJsArch
Source§impl Serialize for NodeJsArch
impl Serialize for NodeJsArch
impl StructuralPartialEq for NodeJsArch
Auto Trait Implementations§
impl Freeze for NodeJsArch
impl RefUnwindSafe for NodeJsArch
impl Send for NodeJsArch
impl Sync for NodeJsArch
impl Unpin for NodeJsArch
impl UnsafeUnpin for NodeJsArch
impl UnwindSafe for NodeJsArch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.