Files
clash-verge-rev/crates/clash-verge-draft/src/error.rs
T
Tunglies 1c7bc3200b refactor(draft): type async publication conflicts
Return typed conflicts for async Draft edits. Release the lock and edit permit before converting the error, and exercise overlapping updates.
2026-11-30 18:13:47 +08:00

13 lines
552 B
Rust

/// Committed data changed before an asynchronous edit could publish.
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
#[error("Optimistic lock failed: Committed data has changed during async operation")]
pub struct DraftConflict;
/// Another transaction is already staging a change to one of the layers asked for.
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[error("configuration layer {layer} is being changed elsewhere")]
pub struct DraftBusy {
/// The layer that was already claimed.
pub layer: &'static str,
}