pub enum Error {
Show 13 variants
ContactMissing,
InvalidContact(String),
AmbiguousStop {
query: String,
candidates: Vec<StopMatch>,
},
StopNotFound {
query: String,
},
RateLimited {
retry_after_seconds: u64,
},
DailyLimit {
limit: u32,
retry_after_seconds: u64,
},
Unavailable {
message: String,
},
Timeout,
BadRequest {
message: String,
},
NotFound {
message: String,
},
Upstream {
message: String,
},
Config(Error),
Usage {
path: String,
source: Error,
},
}Variants§
ContactMissing
No contact is configured, so no request is sent.
InvalidContact(String)
AmbiguousStop
The name fits several stops.
StopNotFound
RateLimited
Too many requests in the last minute, by this client or the server.
DailyLimit
The plan requests of the last 24 hours reached the configured
limit.
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 trip.
Upstream
The server answered something unexpected.
Config(Error)
Usage
The usage counter cannot be read or written.
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 Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more