diff options
| -rw-r--r-- | crates/shirabe-semver/src/constraint/constraint_interface.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/shirabe-semver/src/constraint/constraint_interface.rs b/crates/shirabe-semver/src/constraint/constraint_interface.rs index 7397398..2b2e5e8 100644 --- a/crates/shirabe-semver/src/constraint/constraint_interface.rs +++ b/crates/shirabe-semver/src/constraint/constraint_interface.rs @@ -1 +1,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; +} |
