From c86355d7e0b6c493b587ef3dbf1f71e4eb3be3b4 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 22 Jul 2024 15:43:04 -0700 Subject: [PATCH] add subscription count function Signed-off-by: William Casarin --- src/ndb.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ndb.rs b/src/ndb.rs index cabf54d..406f70c 100644 --- a/src/ndb.rs +++ b/src/ndb.rs @@ -111,6 +111,12 @@ impl Ndb { } } + pub fn subscription_count(&self) -> u32 { + unsafe { + bindings::ndb_num_subscriptions(self.as_ptr()) as u32 + } + } + pub fn subscribe(&self, filters: Vec) -> Result { unsafe { let mut ndb_filters: Vec =