diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-16 23:43:37 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-16 23:43:37 +0900 |
| commit | 9faf73a18ed1ee8a1c9c20c5adb723791dc7dfdf (patch) | |
| tree | b259c66b7bb217330c43369e70e0eca89893c77a /crates/shirabe-semver/src/constraint/constraint_interface.rs | |
| parent | beecbec6becfaaabcffd5bd9c596c055e64778c1 (diff) | |
| download | php-shirabe-9faf73a18ed1ee8a1c9c20c5adb723791dc7dfdf.tar.gz php-shirabe-9faf73a18ed1ee8a1c9c20c5adb723791dc7dfdf.tar.zst php-shirabe-9faf73a18ed1ee8a1c9c20c5adb723791dc7dfdf.zip | |
feat(port): add as_any/is_disjunctive to ConstraintInterface (needed for MultiConstraint)
Diffstat (limited to 'crates/shirabe-semver/src/constraint/constraint_interface.rs')
| -rw-r--r-- | crates/shirabe-semver/src/constraint/constraint_interface.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/shirabe-semver/src/constraint/constraint_interface.rs b/crates/shirabe-semver/src/constraint/constraint_interface.rs index 2b2e5e8..980a23a 100644 --- a/crates/shirabe-semver/src/constraint/constraint_interface.rs +++ b/crates/shirabe-semver/src/constraint/constraint_interface.rs @@ -16,4 +16,11 @@ pub trait ConstraintInterface { fn set_pretty_string(&mut self, pretty_string: Option<String>); fn __to_string(&self) -> String; + + // Rust-specific helpers for instanceof checks in MultiConstraint::matches and optimizeConstraints. + fn is_disjunctive(&self) -> bool { + false + } + + fn as_any(&self) -> &dyn std::any::Any; } |
