pub trait VersionExt {
    // Required methods
    fn increment_major(&mut self);
    fn increment_minor(&mut self);
    fn increment_patch(&mut self);
    fn increment_alpha(&mut self) -> CargoResult<()>;
    fn increment_beta(&mut self) -> CargoResult<()>;
    fn increment_rc(&mut self) -> CargoResult<()>;
    fn metadata(&mut self, metadata: &str) -> CargoResult<()>;
    fn is_prerelease(&self) -> bool;
}
Expand description

Additional version functionality

Required Methods§

source

fn increment_major(&mut self)

Increments the major version number for this Version.

source

fn increment_minor(&mut self)

Increments the minor version number for this Version.

source

fn increment_patch(&mut self)

Increments the patch version number for this Version.

source

fn increment_alpha(&mut self) -> CargoResult<()>

Increment the alpha pre-release number for this Version.

If this isn’t alpha, switch to it.

Errors if this would decrement the pre-release phase.

source

fn increment_beta(&mut self) -> CargoResult<()>

Increment the beta pre-release number for this Version.

If this isn’t beta, switch to it.

Errors if this would decrement the pre-release phase.

source

fn increment_rc(&mut self) -> CargoResult<()>

Increment the rc pre-release number for this Version.

If this isn’t rc, switch to it.

Errors if this would decrement the pre-release phase.

source

fn metadata(&mut self, metadata: &str) -> CargoResult<()>

Append informational-only metadata.

source

fn is_prerelease(&self) -> bool

Checks to see if the current Version is in pre-release status

Implementations on Foreign Types§

source§

impl VersionExt for Version

Implementors§