diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-16 23:31:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-16 23:31:24 +0900 |
| commit | 7205727a446cc13274b512a9971f2ab477eff253 (patch) | |
| tree | 2bd0d1a7ef9f13bbd8974bcfe7c82b2aa147c574 /crates/shirabe-semver/src/constraint | |
| parent | 3a3551a0175c1950f2286258fbf9b89621de773f (diff) | |
| download | php-shirabe-7205727a446cc13274b512a9971f2ab477eff253.tar.gz php-shirabe-7205727a446cc13274b512a9971f2ab477eff253.tar.zst php-shirabe-7205727a446cc13274b512a9971f2ab477eff253.zip | |
feat(port): port ConstraintInterface.php
Diffstat (limited to 'crates/shirabe-semver/src/constraint')
| -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; +} |
