Skip to main content

satay_codegen/error/
parse.rs

1/// Errors that can occur while parsing an OpenAPI document.
2///
3/// This enum is [`non_exhaustive`](https://doc.rust-lang.org/reference/attributes/type_system.html)
4/// so new variants may be added in future releases without a semver break.
5#[derive(Debug, thiserror::Error)]
6#[non_exhaustive]
7pub enum ParseError {
8    /// Failed to parse the OpenAPI YAML document.
9    ///
10    /// Error message: `failed to parse OpenAPI YAML document: {0}`
11    #[error("failed to parse OpenAPI YAML document: {0}")]
12    OpenApiDocument(#[from] yaml_serde::Error),
13}