Public declaration syntax from forge-rs/crates/forge-media/src/error.rs Original source SHA-256: de7c9ef18ea09a0f66361d3069222cbadc993270d0634122f6eba34409c805e8 Function bodies and constant values are omitted. This is not the complete implementation. Source line 34 #[derive(Debug, Error)] pub enum ForgeMediaError { /// Image generation failed. /// /// Returned when the underlying `ImageProvider::generate_image()` call /// fails, including provider-side content filters, rate limits, and /// invalid prompt errors. #[error("image generation failed for model '{model}': {reason}")] GenerationFailed { /// The model identifier (e.g., "dall-e-3"). model: String, /// The error message from the provider. reason: String, }, /// Audio transcription failed. /// /// Returned when the underlying `TranscriptionProvider::transcribe()` call /// fails, including invalid audio data, unsupported codecs, and provider /// errors. #[error("transcription failed for model '{model}': {reason}")] TranscriptionFailed { /// The model identifier (e.g., "whisper-1"). model: String, /// The error message from the provider. reason: String, }, /// Speech synthesis failed. /// /// Returned when the underlying `SpeechProvider::speak()` call fails, /// including invalid voice identifiers, excessively long input, and /// provider errors. #[error("speech synthesis failed for model '{model}': {reason}")] SpeechFailed { /// The model identifier (e.g., "tts-1"). model: String, /// The error message from the provider. reason: String, }, /// Video generation failed. /// /// Returned when the underlying `VideoProvider::generate_video()` call /// fails, including content filters, invalid dimensions, and provider /// errors. #[error("video generation failed for model '{model}': {reason}")] VideoFailed { /// The model identifier (e.g., "sora-1"). model: String, /// The error message from the provider. reason: String, }, /// The requested media format is not supported. /// /// Returned when a format is requested that the provider does not support, /// or when input data uses an unrecognized encoding. #[error("unsupported format '{format}': {reason}")] UnsupportedFormat { /// The format that was requested (e.g., "tiff", "aac"). format: String, /// Why the format is not supported. reason: String, }, /// A `forge-core` error occurred during a media operation. #[error("core error: {0}")] Core(#[from] forge_core::error::ForgeError), }