rocketsplash-rt 0.2.2

Runtime library for loading and rendering Rocketsplash assets (.rst, .rsf)
Documentation
// <FILE>crates/rocketsplash-rt/src/error.rs</FILE>
// <DESC>Runtime error types for rocketsplash-rt</DESC>
// <VERS>VERSION: 1.0.0</VERS>
// <WCTX>Runtime library implementation</WCTX>
// <CLOG>Add Error enum for load/render failures</CLOG>

use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("Invalid format: {message}")]
    InvalidFormat { message: String },

    #[error("Unsupported {format} version {found}; supported {min_supported}..={current}")]
    UnsupportedVersion {
        format: String,
        found: u8,
        min_supported: u8,
        current: u8,
    },

    #[error("Missing glyph '{0}'")]
    MissingGlyph(char),

    #[error("Invalid color: {0}")]
    InvalidColor(String),
}

// <FILE>crates/rocketsplash-rt/src/error.rs</FILE>
// <VERS>END OF VERSION: 1.0.0</VERS>