pub struct NodeMajorVersion(/* private fields */);Expand description
Node.js major version metadata.
Implementations§
Source§impl NodeMajorVersion
impl NodeMajorVersion
Sourcepub const fn new(major: u16) -> Result<NodeMajorVersion, NodeVersionParseError>
pub const fn new(major: u16) -> Result<NodeMajorVersion, NodeVersionParseError>
Creates a Node.js major version.
§Errors
Returns NodeVersionParseError::InvalidVersion when major is zero.
Trait Implementations§
Source§impl Clone for NodeMajorVersion
impl Clone for NodeMajorVersion
Source§fn clone(&self) -> NodeMajorVersion
fn clone(&self) -> NodeMajorVersion
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 moreSource§impl Debug for NodeMajorVersion
impl Debug for NodeMajorVersion
Source§impl Hash for NodeMajorVersion
impl Hash for NodeMajorVersion
Source§impl Ord for NodeMajorVersion
impl Ord for NodeMajorVersion
Source§fn cmp(&self, other: &NodeMajorVersion) -> Ordering
fn cmp(&self, other: &NodeMajorVersion) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NodeMajorVersion
impl PartialEq for NodeMajorVersion
Source§fn eq(&self, other: &NodeMajorVersion) -> bool
fn eq(&self, other: &NodeMajorVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for NodeMajorVersion
impl PartialOrd for NodeMajorVersion
impl Copy for NodeMajorVersion
impl Eq for NodeMajorVersion
impl StructuralPartialEq for NodeMajorVersion
Auto Trait Implementations§
impl Freeze for NodeMajorVersion
impl RefUnwindSafe for NodeMajorVersion
impl Send for NodeMajorVersion
impl Sync for NodeMajorVersion
impl Unpin for NodeMajorVersion
impl UnsafeUnpin for NodeMajorVersion
impl UnwindSafe for NodeMajorVersion
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