commit cb71639ccb8db1265307e4f62886f3dd2bef99fa
parent b6e33adeef582153694038e307edc067bab7ac9e
Author: Yuki Kishimoto <yukikishimoto@protonmail.com>
Date: Mon, 8 Apr 2024 10:41:34 +0200
Add `Tag::into_iter` method
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/tags.rs b/src/tags.rs
@@ -15,6 +15,11 @@ impl<'a> Tag<'a> {
unsafe { bindings::ndb_tag_count(self.as_ptr()) }
}
+ #[inline]
+ pub fn into_iter(self) -> TagIter<'a> {
+ TagIter::new(self)
+ }
+
pub fn get(&self, ind: u16) -> Option<NdbStr<'a>> {
if ind >= self.count() {
return None;