Enum paperclip::PaperClipError[][src]

pub enum PaperClipError {
Show 14 variants Validation(ValidationError), InvalidCodegenDirectory, UnsupportedOpenAPIVersion, RelativePathNotUnique(String), MissingParametersInPath(StringHashSet<String>), InvalidHost(StringParseError), InvalidBasePathURL(StringParseError), 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.

Tuple Fields of Validation

0: ValidationError
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.

Tuple Fields of RelativePathNotUnique

0: String
MissingParametersInPath(StringHashSet<String>)

Tuple Fields of MissingParametersInPath

0: String1: HashSet<String>
InvalidHost(StringParseError)

Invalid host for URL.

Tuple Fields of InvalidHost

0: String1: ParseError
InvalidBasePathURL(StringParseError)

Invalid base path URL.

Tuple Fields of InvalidBasePathURL

0: String1: ParseError
MissingArrayItem(Option<String>)

The given schema object is an array, but the items field is missing.

Tuple Fields of MissingArrayItem

0: Option<String>
InvalidDefinitionName(String)

The name for the given definition is invalid.

Tuple Fields of InvalidDefinitionName

0: String
MissingDefinitionName

The name for the given definition is missing.

InvalidDefinitionPath(PathBuf)

A valid path cannot be obtained for the given definition.

Tuple Fields of InvalidDefinitionPath

0: PathBuf
Io(Error)

I/O errors.

Tuple Fields of Io

0: Error
Json(Error)

JSON coding errors.

Tuple Fields of Json

0: Error
Yaml(Error)

YAML coding errors.

Tuple Fields of Yaml

0: Error

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.