rocketsplash-rt 0.3.0

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: 2.0.0</VERS>
// <WCTX>Foundation crates 0.3.0 (RELEASE_PLAN D2 typed errors)</WCTX>
// <CLOG>2.0.0: wrap rocketsplash_formats::FormatError transparently; drop UnsupportedVersion (now reported by FormatError). 1.0.0: 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),

    /// Format-level failure: decode errors, version windows, structural
    /// limits. Produced by the `rocketsplash-formats` decode entry points.
    #[error(transparent)]
    Format(#[from] rocketsplash_formats::FormatError),

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

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

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

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