Skip to main content

qubit_fs/options/
rename_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//! Rename operation options.
11
12use crate::AtomicityRequirement;
13
14/// Options controlling rename operations.
15#[derive(Clone, Debug, Eq, PartialEq)]
16pub struct RenameOptions {
17    /// Whether the destination may be overwritten.
18    pub overwrite: bool,
19    /// Required atomicity level.
20    pub atomic: AtomicityRequirement,
21}
22
23impl Default for RenameOptions {
24    #[inline]
25    fn default() -> Self {
26        Self {
27            overwrite: false,
28            atomic: AtomicityRequirement::BestEffort,
29        }
30    }
31}