4 releases
new 0.1.3 | Nov 12, 2024 |
---|---|
0.1.2 | Aug 14, 2024 |
0.1.1 | Aug 14, 2024 |
0.1.0 | Aug 11, 2024 |
#4 in #updated
592 downloads per month
Used in 4 crates
25KB
gtfs-realtime
This library is a fork of the original https://github.com/barzamin/gtfs-rt
.
lib.rs
:
Decoding and Encoding example GTFS data example
use prost::Message;
let url = "https://lbtgtfs.lbtransit.com/TMGTFSRealTimeWebService/Vehicle/VehiclePositions.pb";
let response = reqwest::get(url).await.unwrap();
let bytes = response.bytes().await.unwrap();
let data: Result<gtfs_realtime::FeedMessage, prost::DecodeError> = prost::Message::decode(bytes.as_ref());
let data = data.unwrap();
//encode back into protobuf
let rencoded = data.encode_to_vec();
Dependencies
~1.1–3.5MB
~59K SLoC