Struct NodeVersion
pub struct NodeVersion { /* private fields */ }Expand description
Node.js version metadata.
Implementations§
§impl NodeVersion
impl NodeVersion
pub const fn new(
major: u16,
minor: Option<u16>,
patch: Option<u16>,
) -> Result<NodeVersion, NodeVersionParseError>
pub const fn new( major: u16, minor: Option<u16>, patch: Option<u16>, ) -> Result<NodeVersion, NodeVersionParseError>
Creates Node.js version metadata.
§Errors
Returns NodeVersionParseError::InvalidVersion when the major version is invalid.
Trait Implementations§
§impl Clone for NodeVersion
impl Clone for NodeVersion
§fn clone(&self) -> NodeVersion
fn clone(&self) -> NodeVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for NodeVersion
impl Debug for NodeVersion
§impl Display for NodeVersion
impl Display for NodeVersion
§impl FromStr for NodeVersion
impl FromStr for NodeVersion
§type Err = NodeVersionParseError
type Err = NodeVersionParseError
The associated error which can be returned from parsing.
§fn from_str(input: &str) -> Result<NodeVersion, <NodeVersion as FromStr>::Err>
fn from_str(input: &str) -> Result<NodeVersion, <NodeVersion as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for NodeVersion
impl Hash for NodeVersion
§impl Ord for NodeVersion
impl Ord for NodeVersion
§impl PartialEq for NodeVersion
impl PartialEq for NodeVersion
§impl PartialOrd for NodeVersion
impl PartialOrd for NodeVersion
impl Copy for NodeVersion
impl Eq for NodeVersion
impl StructuralPartialEq for NodeVersion
Auto Trait Implementations§
impl Freeze for NodeVersion
impl RefUnwindSafe for NodeVersion
impl Send for NodeVersion
impl Sync for NodeVersion
impl Unpin for NodeVersion
impl UnsafeUnpin for NodeVersion
impl UnwindSafe for NodeVersion
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