pub struct Api<'a> { /* private fields */ }Expand description
Traffic related operations.
Implementations§
Source§impl<'a> Api<'a>
impl<'a> Api<'a>
Sourcepub fn get_incidents(&self) -> GetTrafficIncidentsAction<'a>
pub fn get_incidents(&self) -> GetTrafficIncidentsAction<'a>
Returns incidents currently happening on the roads, such as Accidents, Vehicle Breakdowns, Road Blocks, Traffic Diversions etc. Update freq: 2 min
§Optional request settings
skip: Number of records to skip for pagination.
§Example
ⓘ
let request = api
.traffic()
.get_incidents()
.skip(skip)
.request()?;Sourcepub fn get_images(&self) -> GetTrafficImagesAction<'a>
pub fn get_images(&self) -> GetTrafficImagesAction<'a>
Sourcepub fn get_speed_bands(&self) -> GetTrafficSpeedBandsAction<'a>
pub fn get_speed_bands(&self) -> GetTrafficSpeedBandsAction<'a>
Sourcepub fn get_flow(&self) -> GetTrafficFlowAction<'a>
pub fn get_flow(&self) -> GetTrafficFlowAction<'a>
Returns a link to a JSON file containing hourly average traffic flow, taken from a representative month of every quarter during 0700-0900 hours. Update freq: Quarterly
Sourcepub fn get_road_works(&self) -> GetRoadWorksAction<'a>
pub fn get_road_works(&self) -> GetRoadWorksAction<'a>
Returns road works currently in progress or planned, together with event details and the responsible agency.
Update freq: 24 hours – whenever there are updates
§Optional request settings
skip: Number of records to skip for pagination.
§Example
ⓘ
let request = api
.traffic()
.get_road_works()
.skip(skip)
.request()?;Sourcepub fn get_road_openings(&self) -> GetRoadOpeningsAction<'a>
pub fn get_road_openings(&self) -> GetRoadOpeningsAction<'a>
Returns all planned road openings, including the new road name and the responsible agency. Update freq: 24 hours – whenever there are updates
§Optional request settings
skip: Number of records to skip for pagination.
§Example
ⓘ
let request = api
.traffic()
.get_road_openings()
.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