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::*;

/// Distribution channel delivery mode sharing the exact same manifest, pinning, and rollback contract.
#[derive(
    Clone, Copy, Debug, Default, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize,
)]
#[serde(rename_all = "snake_case")]
pub enum DeliveryChannelMode {
    /// Executable sandboxed Wasm Component / WIT modules for channels permitting dynamic Wasm execution.
    #[default]
    WasmComponent,
    /// Store-compliant Declarative Data channel (App Store / Google Play) interpreting signed UI/style/action specs only.
    DeclarativeData,
}

/// Content classification of a single content-addressed release artifact.
#[derive(
    Clone, Copy, Debug, Default, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize,
)]
#[serde(rename_all = "snake_case")]
pub enum ArtifactKind {
    /// Executable WebAssembly component or core `.wasm` module.
    #[default]
    WasmComponent,
    /// Signed declarative JSON `DynamicNodeSpec` / `DynamicUpdateBundle` payload.
    DeclarativeSpec,
    /// Immutable static resource bundle (fonts, icons, themes, tokens).
    AssetBundle,
}

/// Comprehensive typed error taxonomy for manifest verification, negotiation, state recovery, and activation.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum DynamicReleaseError {
    /// Release manifest signature was absent, malformed, or did not verify under the trusted key.
    InvalidSignature(String),
    /// Release or artifact ABI range does not include the host ABI version.
    AbiIncompatible {
        /// Running host ABI version.
        host_abi: u32,
        /// Minimum ABI required by the release or artifact.
        min_abi: u32,
        /// Maximum ABI supported by the release or artifact.
        max_abi: u32,
    },
    /// Release delivery mode is incompatible with the client channel policy.
    UnsupportedDeliveryMode {
        /// Allowed client delivery mode.
        allowed: DeliveryChannelMode,
        /// Incoming release delivery mode.
        incoming: DeliveryChannelMode,
    },
    /// Host lacks a capability required by the release or one of its artifacts.
    MissingCapability(String),
    /// Transitive dependency graph or hash closure is broken.
    BrokenDependencyClosure(String),
    /// Downloaded or cached blob bytes failed SHA-256 verification.
    HashMismatch {
        /// Expected 64-char SHA-256 hex digest.
        expected: String,
        /// Actual computed SHA-256 hex digest.
        actual: String,
    },
    /// Incoming release sequence did not strictly advance over the active sequence.
    NonMonotonicRelease {
        /// Currently accepted release sequence.
        current: u64,
        /// Incoming release sequence.
        incoming: u64,
    },
    /// Required content-addressed blob could not be found in cache or remote store.
    BlobMissing(String),
    /// Requested route is not declared in the pinned release manifest.
    RouteNotFound(String),
    /// Mounted component implementation does not satisfy the compile-time contract interface ID or version.
    InterfaceMismatch {
        /// Compile-time expected interface ID.
        expected_interface: String,
        /// Actual artifact interface ID.
        actual_interface: String,
    },
    /// Pure background state migration failed or would lose active user draft state.
    StateMigrationFailed(String),
    /// Hot-swap was deferred because the UI is not at a safe interaction boundary.
    UnsafeSwapPoint(String),
    /// Delta catch-up from revision `R` to `R+n` failed because history wrapped or conflicted.
    StateCatchUpConflict {
        /// Snapshot base revision `R`.
        base_revision: u64,
        /// Live store revision `R+n`.
        live_revision: u64,
    },
    /// Client/server protocol negotiation found no mutually compatible track or schema.
    ProtocolIncompatible(String),
    /// Network or HTTP/SSE transport failure.
    NetworkError(String),
    /// Serialization, deserialization, or local storage failure.
    StorageError(String),
}