commit c86355d7e0b6c493b587ef3dbf1f71e4eb3be3b4
parent b06a0f0fafc9e7c4b2a1abd73fd7549462d6066f
Author: William Casarin <jb55@jb55.com>
Date: Mon, 22 Jul 2024 15:43:04 -0700
add subscription count function
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git 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<Filter>) -> Result<Subscription> {
unsafe {
let mut ndb_filters: Vec<bindings::ndb_filter> =