summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2025-10-12 12:08:13 -0400
committerJosh Ferrell <josh@vector35.com>2025-10-12 12:08:13 -0400
commit573b03c844090b53fb49b2156deae7540c8c3059 (patch)
treec5b33a8c696307984d49526acc57f8a8bbc0a63b /rust/src
parentba282a42855ab2def22b5915e03ba91d47693867 (diff)
Improve error handling in project apis
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/project.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/rust/src/project.rs b/rust/src/project.rs
index f47c472a..6c0366c0 100644
--- a/rust/src/project.rs
+++ b/rust/src/project.rs
@@ -97,7 +97,7 @@ impl Project {
}
/// Set the name of the project
- pub fn set_name(&self, value: &str) {
+ pub fn set_name(&self, value: &str) -> bool {
let value = value.to_cstr();
unsafe { BNProjectSetName(self.handle.as_ptr(), value.as_ptr()) }
}
@@ -108,7 +108,7 @@ impl Project {
}
/// Set the description of the project
- pub fn set_description(&self, value: &str) {
+ pub fn set_description(&self, value: &str) -> bool {
let value = value.to_cstr();
unsafe { BNProjectSetDescription(self.handle.as_ptr(), value.as_ptr()) }
}
@@ -130,12 +130,12 @@ impl Project {
}
/// Removes the metadata associated with this `key` from the project
- pub fn remove_metadata(&self, key: &str) {
+ pub fn remove_metadata(&self, key: &str) -> bool {
let key_raw = key.to_cstr();
unsafe { BNProjectRemoveMetadata(self.handle.as_ptr(), key_raw.as_ptr()) }
}
- pub fn push_folder(&self, file: &ProjectFolder) {
+ pub fn push_folder(&self, file: &ProjectFolder) -> bool {
unsafe { BNProjectPushFolder(self.handle.as_ptr(), file.handle.as_ptr()) }
}
@@ -288,7 +288,7 @@ impl Project {
}
}
- pub fn push_file(&self, file: &ProjectFile) {
+ pub fn push_file(&self, file: &ProjectFile) -> bool {
unsafe { BNProjectPushFile(self.handle.as_ptr(), file.handle.as_ptr()) }
}