summaryrefslogtreecommitdiff
path: root/rust/src/component.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/component.rs')
-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()) }