#[non_exhaustive]pub enum SourceError {
Json(Error),
Yaml(Error),
NotAnObject,
NoVersion,
UnknownVersion {
field: &'static str,
value: String,
},
Parse {
version: SourceVersion,
source: Error,
},
Convert {
version: SourceVersion,
source: ConversionError,
},
}Expand description
Why a description could not become a SourceDocument.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Json(Error)
Yaml(Error)
The YAML reader rejected the input: a syntax error, a duplicate mapping key, or a document past the reader’s size and alias budget.
NotAnObject
NoVersion
UnknownVersion
Parse
Convert
The description parsed, but roas could not convert it to OpenAPI 3.2: a gap in the
conversion rather than in the description.
Trait Implementations§
Source§impl Debug for SourceError
impl Debug for SourceError
Source§impl Display for SourceError
impl Display for SourceError
Source§impl Error for SourceError
impl Error for SourceError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SourceError
impl !UnwindSafe for SourceError
impl Forget for SourceError
impl Freeze for SourceError
impl Move for SourceError
impl Send for SourceError
impl Sync for SourceError
impl Unpin for SourceError
impl UnsafeUnpin for SourceError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more