qubit_local_files/local/local_persist_options.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10/// Options controlling temporary file persistence behavior.
11///
12/// The default is conservative: existing destination paths are not overwritten.
13#[derive(Clone, Copy, Debug, Eq, PartialEq)]
14pub struct LocalPersistOptions {
15 /// Whether an existing target path may be overwritten.
16 pub overwrite: bool,
17}
18
19impl Default for LocalPersistOptions {
20 /// Returns conservative persistence options.
21 ///
22 /// # Returns
23 /// Options that reject existing destination paths.
24 #[inline]
25 fn default() -> Self {
26 Self { overwrite: false }
27 }
28}