From 938e9506996df13b3f08419854aa73c7d24f2d44 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 13 Mar 2026 12:19:41 -0700 Subject: [Rust] Misc docs --- rust/src/background_task.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rust/src/background_task.rs') 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 { let text = initial_text.to_cstr(); let handle = unsafe { BNBeginBackgroundTask(text.as_ptr(), can_cancel) }; -- cgit v1.3.1