feat(rust): Add an id() method for QueryMatch

Refs #1372
This commit is contained in:
Andrew Hlynskyi 2021-09-14 19:00:50 +03:00
parent 22a5cfbe10
commit ae12ff81b5

View file

@ -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) }
}