aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-semver/src/constraint/constraint_interface.rs
blob: 2b2e5e8c5c4cbc7915a51b57dc81e909d7d381d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! ref: composer/vendor/composer/semver/src/Constraint/ConstraintInterface.php

use crate::constraint::bound::Bound;

pub trait ConstraintInterface {
    fn matches(&self, provider: &dyn ConstraintInterface) -> bool;

    fn compile(&self, other_operator: i64) -> String;

    fn get_upper_bound(&self) -> Bound;

    fn get_lower_bound(&self) -> Bound;

    fn get_pretty_string(&self) -> String;

    fn set_pretty_string(&mut self, pretty_string: Option<String>);

    fn __to_string(&self) -> String;
}