euv-core 0.47.1

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Outcome returned by the host-owned `BusinessStateStore` when handling a typed command.
#[derive(Clone, Debug, PartialEq)]
pub enum CommandOutcome {
    /// Command committed atomically at `revision` (or replayed via idempotency key).
    Committed {
        /// Stable operation identifier assigned by the host.
        operation_id: OperationId,
        /// Target business entity identifier.
        entity_id: String,
        /// Committed entity revision number.
        revision: u64,
        /// Authoritative post-commit entity state.
        state: Value,
        /// `true` when this result was returned from idempotency deduplication.
        deduplicated: bool,
    },
    /// Command accepted into host-owned in-flight execution and guaranteed to finish across hot-swaps.
    Pending {
        /// Stable operation identifier assigned by the host.
        operation_id: OperationId,
        /// Target business entity identifier.
        entity_id: String,
        /// Entity revision observed when the command was accepted.
        submitted_revision: u64,
    },
    /// Command rejected because `expected_revision` did not match the live authoritative revision.
    RejectedRevisionConflict {
        /// Stable operation identifier assigned by the host.
        operation_id: OperationId,
        /// Revision expected by the caller.
        expected: u64,
        /// Live authoritative revision stored by the host.
        actual: u64,
    },
    /// Command rejected due to validation or host business rule failure.
    RejectedError {
        /// Stable operation identifier assigned by the host.
        operation_id: OperationId,
        /// Diagnostic failure description.
        reason: String,
    },
}