From ae12ff81b5534869e414ecf4294059b97eccd9fc Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Tue, 14 Sep 2021 19:00:50 +0300 Subject: [PATCH] feat(rust): Add an id() method for QueryMatch Refs #1372 --- lib/binding_rust/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/binding_rust/lib.rs b/lib/binding_rust/lib.rs index 57f678d8..04dd78bf 100644 --- a/lib/binding_rust/lib.rs +++ b/lib/binding_rust/lib.rs @@ -1753,6 +1753,10 @@ impl QueryCursor { } impl<'a, 'tree> QueryMatch<'a, 'tree> { + pub fn id(&self) -> u32 { + self.id + } + pub fn remove(self) { unsafe { ffi::ts_query_cursor_remove_match(self.cursor, self.id) } }