Enum semver_parser::range::Op[][src]

pub enum Op {
    Ex,
    Gt,
    GtEq,
    Lt,
    LtEq,
    Tilde,
    Compatible,
    Wildcard(WildcardVersion),
}

Enum representing operation in Predicate.

This enum represents an operation for comparing two version::Versions.

Examples

Parsing Op from string:

use semver_parser::range;
use std::str::FromStr;

let exact = range::Op::from_str("=")?;
assert_eq!(exact, range::Op::Ex);
let gt_eq = range::Op::from_str(">=")?;
assert_eq!(gt_eq, range::Op::GtEq);

Variants

Exact, =.

Greater than, >.

Greater than or equal to, >=.

Less than, <.

Less than or equal to, <=.

Tilde requirements, like ~1.0.0 - a minimal version with some ability to update.

Compatible by definition of semver, indicated by ^.

x.y.*, x.*, *.

Trait Implementations

impl PartialOrd for Op
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Op
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialEq for Op
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Op
[src]

impl Debug for Op
[src]

Formats the value using the given formatter. Read more

impl Clone for Op
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Op
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl FromStr for Op
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for Op

impl Sync for Op