pub enum Error {
}Expand description
Errors that may be produced by the root part of the Google Maps Platform API client.
Variants§
Type(Error)
Error originating from the types and structs in the google_maps crate.
AddressValidation(Error)
Error originating from the Google Maps Address Validation API client module or server.
Directions(Error)
Error originating from the Google Maps Directions API client module or server.
DistanceMatrix(Error)
Error originating from the Google Maps Distance Matrix API client module or server.
Elevation(Error)
Error originating from the Google Maps Elevation API client module or server.
Geocoding(Error)
Error originating from the Google Maps Geocoding API client module or server.
PlacesNew
Error originating from the Google Maps Places API (New) client module or server.
Roads(Error)
Error originating from the Google Maps Roads API client module or server.
TimeZone(Error)
Error originating from the Google Maps Time Zone API client module or server.
Reqwest(Error)
Error originating from the reqwest crate.
Http(HttpErrorStatus)
An HTTP status code returned by the remote server indicates an error. This represents a successful HTTP connection but an unsuccessful HTTP request or transaction with the server.
403 Forbidden· Ensure that a correct Google Maps API key is being supplied and that the target API has been enabled for this API key.
InvalidHeaderValue
Invalid HTTP header value.
Occurs when attempting to create an HTTP header with an invalid value, typically due to non-ASCII characters or other formatting issues that violate HTTP header specifications.
Json(Error)
Error originating from the serde_json crate.
Generally this means that the Google Maps API returned data in an
unexpected format. A struct or enum may need to be changed in this
crate to match what Google Maps
is returning.
Please file an issue and include as much information as possible, including the request and the JSON response if available.
Trait Implementations§
Source§impl ClassifiableError<'_, Error> for Error
impl ClassifiableError<'_, Error> for Error
Source§fn classify(&self) -> ClassifiedError<'_, Self>
fn classify(&self) -> ClassifiedError<'_, Self>
Classifies a google_maps error
as a Transient error or Permanent error.
This classification will, in turn, be used to decide whether the HTTP request should be retried or not.
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 help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?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>
ReportHandlers to change the display format
of this diagnostic. Read moreSource§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_codeDiagnostics.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<HttpErrorStatus> for Error
impl From<HttpErrorStatus> for Error
Source§fn from(source: HttpErrorStatus) -> Self
fn from(source: HttpErrorStatus) -> Self
Source§impl From<StatusCode> for Error
Available on crate feature reqwest only.
impl From<StatusCode> for Error
reqwest only.Source§fn from(status_code: StatusCode) -> Self
fn from(status_code: StatusCode) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.