summaryrefslogtreecommitdiff
path: root/rust/src/background_task.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2026-03-13 12:19:41 -0700
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-03-24 18:46:48 -0700
commit938e9506996df13b3f08419854aa73c7d24f2d44 (patch)
treefe86a80be40e2ae2db4e4f34eebfeccd1672bd8b /rust/src/background_task.rs
parent61e4e7e772b9c427bf190f8557afc466d0488848 (diff)
[Rust] Misc docs
Diffstat (limited to 'rust/src/background_task.rs')
-rw-r--r--rust/src/background_task.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/src/background_task.rs b/rust/src/background_task.rs
index 79aec683..1d902c3a 100644
--- a/rust/src/background_task.rs
+++ b/rust/src/background_task.rs
@@ -70,6 +70,9 @@ impl BackgroundTask {
Self { handle }
}
+ /// Begin the [`BackgroundTask`], you must manually finish the task by calling [`BackgroundTask::finish`].
+ ///
+ /// If you wish to automatically finish the task when leaving the scope, use [`BackgroundTask::enter`].
pub fn new(initial_text: &str, can_cancel: bool) -> Ref<Self> {
let text = initial_text.to_cstr();
let handle = unsafe { BNBeginBackgroundTask(text.as_ptr(), can_cancel) };