pub enum LoadError {
Show 16 variants
Overlay(OverlayError),
Shape(Error),
NoServer,
ServerUrl {
url: String,
source: InvalidUri,
},
NoOperationId {
method: String,
path: String,
},
Name(NameError),
Override {
op: String,
key: &'static str,
},
DuplicateCommand {
group: CommandName,
command: CommandName,
first: String,
second: String,
},
GateList {
op: String,
key: &'static str,
},
ReservedGate {
op: String,
gate: Gate,
},
DuplicateGate {
op: String,
gate: Gate,
},
GatedRead {
op: String,
gate: Gate,
},
Reference(RefError),
Parameter {
op: String,
name: String,
why: Unsupported,
},
MediaType {
op: String,
media_type: String,
},
Unrunnable {
op: String,
name: String,
source: ScalarError,
},
}Expand description
Reducing an OpenAPI document to Operations failed.
Requires the document feature. Every variant names a way that reading a
document goes wrong, so the whole type is bless-time: a binary that starts
from Document::from_blob cannot produce one, does not compile one, and
does not have to know the list exists.
Variants§
Overlay(OverlayError)
Shape(Error)
NoServer
ServerUrl
NoOperationId
Name(NameError)
Override
DuplicateCommand
GateList
ReservedGate
DuplicateGate
GatedRead
A read that names a gate is a document saying two things at once: a read is sent on sight, so there is nothing for the gate to hold back. Refused rather than mounted, because one of the two statements is a mistake and the document does not say which.
Reference(RefError)
Parameter
A parameter this CLI cannot supply that the document says a caller must.
Every other unsupported parameter is carried as Shape::Unreachable
and costs the document nothing. This one is an operation that could never
be invoked correctly, so it is named here rather than mounted as a
subcommand that is guaranteed to build a request the server refuses.
MediaType
A requestBody whose content key names no media type — form-data
where multipart/form-data was meant. Refused while the document is
reduced, because the alternative is a request sent under a
Content-Type no server can read.
Unrunnable
A rule the document states that cannot be run — a pattern no regex
engine here reads. Refused while the document is reduced, because a rule
that cannot run is one every value would otherwise pass.
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()