summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-06-14 14:31:09 -0300
committerJosh Ferrell <josh@vector35.com>2024-07-02 15:54:54 -0400
commit1d5a2cf45e15abb5c3ee3b50556a1d872800edb7 (patch)
tree96c168c4df1c588e687cdc97b56413934d5b0867 /rust
parentb47f34b2c82e1829d03f327bdcd602a83ae5e08b (diff)
add Component missing functions
Diffstat (limited to 'rust')
-rw-r--r--rust/src/component.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/rust/src/component.rs b/rust/src/component.rs
index e17efabf..bee101be 100644
--- a/rust/src/component.rs
+++ b/rust/src/component.rs
@@ -227,8 +227,32 @@ impl Component {
};
unsafe { Array::new(result, count, ()) }
}
+
+ pub fn remove_itself(&self) -> bool {
+ unsafe { BNComponentRemoveComponent(self.as_raw()) }
+ }
+
+ pub fn remove_all_functions(&self) {
+ unsafe { BNComponentRemoveAllFunctions(self.as_raw()) }
+ }
+
+ pub fn add_all_members(&self, component: &Component) {
+ unsafe { BNComponentAddAllMembersFromComponent(self.as_raw(), component.as_raw()) }
+ }
}
+impl PartialEq for Component {
+ fn eq(&self, other: &Self) -> bool {
+ unsafe { BNComponentsEqual(self.as_raw(), other.as_raw()) }
+ }
+
+ fn ne(&self, other: &Self) -> bool {
+ unsafe { BNComponentsNotEqual(self.as_raw(), other.as_raw()) }
+ }
+}
+
+impl Eq for Component {}
+
impl Drop for Component {
fn drop(&mut self) {
unsafe { BNFreeComponent(self.as_raw()) }