co_actor/task_spawner_local.rs
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (C) 2026 1io BRANDGUARDIAN GmbH
3
4use crate::task_handle::TaskHandle;
5use std::future::Future;
6
7pub type LocalTaskHandle<T> = TaskHandle<T>;
8
9/// Spawn a local (not Send) future.
10pub trait LocalTaskSpawner {
11 fn spawn_local<F>(&self, fut: F) -> LocalTaskHandle<F::Output>
12 where
13 F: Future + 'static,
14 F::Output: Send + 'static;
15}