Enum postcode_nl::PostcodeError
source · [−]pub enum PostcodeError {
InvalidInput(String),
NoApiResponse(String),
InvalidApiResponse(String),
InvalidData(String),
TooManyRequests(String),
OtherApiError(String),
}Expand description
Possible errors when fetching an address.
Variants
InvalidInput(String)
The supplied postcode does not have the correct format: 1234AB or 1234 AB (with one space).
NoApiResponse(String)
The API did not respond to the request.
InvalidApiResponse(String)
The API response body could not be parsed.
InvalidData(String)
The API responded that the inputs are incorrect. This should not happen and instead PostcodeError::InvalidInput should be returned.
TooManyRequests(String)
The API responded with 429 TOO MANY REQUESTS. You’ve exceeded the API limits.
OtherApiError(String)
The API returned an unexpected error code.
Trait Implementations
sourceimpl Debug for PostcodeError
impl Debug for PostcodeError
sourceimpl Display for PostcodeError
impl Display for PostcodeError
sourceimpl Error for PostcodeError
impl Error for PostcodeError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn 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 PostcodeError
impl Send for PostcodeError
impl Sync for PostcodeError
impl Unpin for PostcodeError
impl UnwindSafe for PostcodeError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more