qubit_executor/task/try_get.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10use super::TaskResult;
11
12/// Result of a non-blocking attempt to retrieve a task result.
13pub enum TryGet<H, R, E> {
14 /// The task result is ready.
15 Ready(TaskResult<R, E>),
16 /// The task has not completed and the handle is returned to the caller.
17 Pending(H),
18}