Enum paperclip::PaperClipError
source · pub enum PaperClipError {
Show 14 variants
Validation(ValidationError),
InvalidCodegenDirectory,
UnsupportedOpenAPIVersion,
RelativePathNotUnique(String),
MissingParametersInPath(String, HashSet<String>),
InvalidHost(String, ParseError),
InvalidBasePathURL(String, ParseError),
MissingArrayItem(Option<String>),
InvalidDefinitionName(String),
MissingDefinitionName,
InvalidDefinitionPath(PathBuf),
Io(Error),
Json(Error),
Yaml(Error),
}
Expand description
Global error which encapsulates all related errors.
Variants§
Validation(ValidationError)
Error encountered during spec validation.
InvalidCodegenDirectory
The given directory cannot be used for generating code.
UnsupportedOpenAPIVersion
Currently, we only support OpenAPI v2, and eventually v3.
RelativePathNotUnique(String)
Paths listed in the spec must be unique.
MissingParametersInPath(String, HashSet<String>)
InvalidHost(String, ParseError)
Invalid host for URL.
InvalidBasePathURL(String, ParseError)
Invalid base path URL.
MissingArrayItem(Option<String>)
The given schema object is an array, but the items
field is missing.
InvalidDefinitionName(String)
The name for the given definition is invalid.
MissingDefinitionName
The name for the given definition is missing.
InvalidDefinitionPath(PathBuf)
A valid path cannot be obtained for the given definition.
Io(Error)
I/O errors.
Json(Error)
JSON coding errors.
Yaml(Error)
YAML coding errors.
Trait Implementations§
source§impl Debug for PaperClipError
impl Debug for PaperClipError
source§impl Display for PaperClipError
impl Display for PaperClipError
source§impl Error for PaperClipError
impl Error for PaperClipError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl From<Error> for PaperClipError
impl From<Error> for PaperClipError
source§impl From<Error> for PaperClipError
impl From<Error> for PaperClipError
source§impl From<Error> for PaperClipError
impl From<Error> for PaperClipError
source§impl From<ValidationError> for PaperClipError
impl From<ValidationError> for PaperClipError
source§fn from(s: ValidationError) -> Self
fn from(s: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PaperClipError
impl Send for PaperClipError
impl Sync for PaperClipError
impl Unpin for PaperClipError
impl !UnwindSafe for PaperClipError
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