From 7205727a446cc13274b512a9971f2ab477eff253 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 16 May 2026 23:31:24 +0900 Subject: feat(port): port ConstraintInterface.php --- .../src/constraint/constraint_interface.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crates/shirabe-semver/src/constraint/constraint_interface.rs') 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); + + fn __to_string(&self) -> String; +} -- cgit v1.3.1