summary refs log tree commit diff stats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2021-02-11 00:52:25 -0300
committerSoniEx2 <endermoneymod@gmail.com>2021-02-11 00:52:25 -0300
commitabaee464936a821568c3fdbd52b9aadd3adb6d0f (patch)
tree8a8b5c271f0b8b67eeb77e94a68ecf73ffc4e1f9 /src/lib.rs
parent69652efe8ad9738a94fef571c8b81e342f96e7b4 (diff)
Partially implement VM
The following are now implemented:

- [x] Arrow
- [x] StringKey
- [x] RegexKey
- [ ] KeySubtree
- [ ] ValueSubtree
- [x] Ident
- [ ] Param
- [x] ApplyPredicate
- [x] End
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2407115..cbd32b2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -127,6 +127,11 @@ pub trait PatternTypes {
         left: RefOwn<'_, Self::Ref, Self::Own>,
         right: RefOwn<'_, Self::Ref, Self::Own>
     ) -> bool;
+
+    /// Returns the value as an &str.
+    fn as_str<'b>(
+        value: RefOwn<'b, Self::Ref, Self::Own>
+    ) -> Option<&'b str>;
 }
 
 // TODO