Skip to main content

SelectableVersion

Trait SelectableVersion 

Source
pub trait SelectableVersion: Display {
    // Required methods
    fn is_prerelease(&self) -> bool;
    fn major(&self) -> u64;
    fn minor(&self) -> u64;
    fn patch(&self) -> u64;
}
Expand description

A version type the select_version algorithm can operate on.

Implemented in this crate for both node_semver::Version and semver::Version. The impls live here (rather than in the ecosystem crates) because both the Node and GitHub registries resolve node_semver::Version; a per-crate impl would violate the orphan rule.

Required Methods§

Source

fn is_prerelease(&self) -> bool

Whether this version carries a pre-release tag (e.g. -rc.1).

Source

fn major(&self) -> u64

Major version component.

Source

fn minor(&self) -> u64

Minor version component.

Source

fn patch(&self) -> u64

Patch version component.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SelectableVersion for Version

Source§

fn is_prerelease(&self) -> bool

Source§

fn major(&self) -> u64

Source§

fn minor(&self) -> u64

Source§

fn patch(&self) -> u64

Source§

impl SelectableVersion for Version

Source§

fn is_prerelease(&self) -> bool

Source§

fn major(&self) -> u64

Source§

fn minor(&self) -> u64

Source§

fn patch(&self) -> u64

Source§

impl SelectableVersion for Version

Source§

fn is_prerelease(&self) -> bool

any_prerelease covers alpha/beta/rc and dev releases — all of which are “not a final stable release” for selection purposes.

Source§

fn major(&self) -> u64

Source§

fn minor(&self) -> u64

Source§

fn patch(&self) -> u64

Implementors§