Enum google_maps::elevation::error::Error
source · pub enum Error {
EitherPositionalOrSampledPath,
GoogleMapsService(Status, Option<String>),
HttpUnsuccessful(String),
InvalidStatusCode(String),
QueryNotBuilt,
RequestNotValidated,
Reqwest(Error),
ReqwestMessage(String),
SerdeJson(Error),
}
Expand description
Errors that may be produced by the Google Maps Elevation API client.
Variants§
EitherPositionalOrSampledPath
A sampled_path_request()
method cannot be used when postional_request()
has been set.
GoogleMapsService(Status, Option<String>)
Google Maps Elevation API server generated an error. See the Status
enum for more information.
HttpUnsuccessful(String)
The HTTP request was unsuccessful.
InvalidStatusCode(String)
API client library attempted to parse a string that contained an invalid
status code. See google_maps\src\elevation\response\status.rs
for
more information.
QueryNotBuilt
The query string must be built before the request may be sent to the Google Maps Elevation API server.
RequestNotValidated
The request must be validated before a query string may be built.
Reqwest(Error)
The dependency library Reqwest generated an error.
ReqwestMessage(String)
The dependency library Reqwest generated an error. The error could
not be passed normally so a String
representation is passed instead.
SerdeJson(Error)
The dependency library Serde JSON generated an error.
Trait Implementations§
source§impl Diagnostic for Error
impl Diagnostic for Error
source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic
. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or enums will work just fine.source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic
.source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandler
s to change the display format
of this diagnostic. Read moresource§fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic
. Do you have any
advice for the poor soul who’s just run into this issue?source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic
’s Diagnostic::labels
to.source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic
’s Diagnostic::source_code
Diagnostic
s.