pub struct Api<'a> { /* private fields */ }Expand description
Bus related operations.
Implementations§
Source§impl<'a> Api<'a>
impl<'a> Api<'a>
Sourcepub fn get_arrival(&self, bus_stop_code: u32) -> GetBusArrivalAction<'a>
pub fn get_arrival(&self, bus_stop_code: u32) -> GetBusArrivalAction<'a>
Returns real-time Bus Arrival information of Bus Services at a queried Bus Stop, including
- Estimated Arrival Time
- Estimated Current Location
- Estimated Current Load.
Update freq: 20s
§Arguments
bus_stop_code: Bus stop reference code.
§Optional request settings
service_no: Optional bus service number filter.
§Example
ⓘ
let request = api
.bus()
.get_arrival(bus_stop_code)
.service_no(service_no)
.request()?;Sourcepub fn get_stops(&self) -> GetBusStopsAction<'a>
pub fn get_stops(&self) -> GetBusStopsAction<'a>
Returns detailed information for all bus stops currently being serviced by buses, including bus stop codes and location coordinates.
Update freq: Ad-Hoc
§Optional request settings
skip: Number of records to skip for pagination.
§Example
ⓘ
let request = api
.bus()
.get_stops()
.skip(skip)
.request()?;Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Api<'a>
impl<'a> RefUnwindSafe for Api<'a>
impl<'a> Send for Api<'a>
impl<'a> Sync for Api<'a>
impl<'a> Unpin for Api<'a>
impl<'a> UnsafeUnpin for Api<'a>
impl<'a> UnwindSafe for Api<'a>
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