diff options
| author | Mason Reed <mason@vector35.com> | 2026-03-13 12:19:41 -0700 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-03-24 18:46:48 -0700 |
| commit | 938e9506996df13b3f08419854aa73c7d24f2d44 (patch) | |
| tree | fe86a80be40e2ae2db4e4f34eebfeccd1672bd8b /rust/src/background_task.rs | |
| parent | 61e4e7e772b9c427bf190f8557afc466d0488848 (diff) | |
[Rust] Misc docs
Diffstat (limited to 'rust/src/background_task.rs')
| -rw-r--r-- | rust/src/background_task.rs | 3 |
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) }; |
