pub enum Error {
AccessIdMissing,
AccessDenied {
message: String,
},
AmbiguousStop {
query: String,
candidates: Vec<StopMatch>,
},
StopNotFound {
query: String,
},
RateLimited {
message: String,
retry_after_seconds: u64,
},
Unavailable {
message: String,
},
Timeout,
BadRequest {
message: String,
},
NotFound {
message: String,
},
Upstream {
message: String,
},
Config(Error),
}Variants§
AccessIdMissing
No access key is configured, so no request is sent.
AccessDenied
The server rejected the access key.
AmbiguousStop
The name fits several stops.
StopNotFound
RateLimited
The quota of the access key is used up, or too many requests came at once.
The server cannot be reached or has a problem.
Timeout
BadRequest
The server rejected the request.
NotFound
The server does not know the stop or journey.
Upstream
The server answered something unexpected.
Config(Error)
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Errorwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<StopMatch>: Freeze,
*const () is !null: Freeze,
PhantomData<ErrorData<CustomOwner>>: Freeze,
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Errorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<StopMatch>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
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