pub enum RainfallOperationResponse {
Ok(RainfallResponse),
BadRequest(InvalidParamsError),
NotFound(DataNotFoundError),
Status429(RateLimitError),
UnexpectedStatus(StatusCode, Vec<u8>),
}Expand description
https://api-open.data.gov.sg/v2/real-time/api/rainfall
-
Filter for a specific date by providing
datein query parameter (YYYY-MM-DD). -
example:
?date=2024-07-16 -
If
dateis not provided in query parameter, API will return the latest reading -
Unit of measure for readings is
mm
Variants§
Ok(RainfallResponse)
Rainfall Information
BadRequest(InvalidParamsError)
Invalid request (bad date format or pagination token)
NotFound(DataNotFoundError)
Weather data not found
Status429(RateLimitError)
Rate limit exceeded (429). Wait and retry, or use an x-api-key.
UnexpectedStatus(StatusCode, Vec<u8>)
Trait Implementations§
Source§impl Clone for RainfallOperationResponse
impl Clone for RainfallOperationResponse
Source§fn clone(&self) -> RainfallOperationResponse
fn clone(&self) -> RainfallOperationResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RainfallOperationResponse
impl Debug for RainfallOperationResponse
impl StructuralPartialEq for RainfallOperationResponse
Auto Trait Implementations§
impl Freeze for RainfallOperationResponse
impl RefUnwindSafe for RainfallOperationResponse
impl Send for RainfallOperationResponse
impl Sync for RainfallOperationResponse
impl Unpin for RainfallOperationResponse
impl UnsafeUnpin for RainfallOperationResponse
impl UnwindSafe for RainfallOperationResponse
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