Skip to content

Commit

Permalink
add subscription count function
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Jul 22, 2024
1 parent b06a0f0 commit c86355d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ndb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> =
Expand Down

0 comments on commit c86355d

Please sign in to comment.