| Crates.io | dvb |
| lib.rs | dvb |
| version | 0.7.4 |
| created_at | 2016-09-16 12:10:29.577271+00 |
| updated_at | 2026-01-11 19:03:28.658796+00 |
| description | An unofficial crate to query publicly accessible API methods for Dresden's public transport system. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 6514 |
| size | 159,992 |
An unofficial Rust library for querying Dresden's public transport system API.
iso8601-serializationBy default, DvbTime deserializes from the DVB API's custom /Date(...) format and serializes back to the same format.
Enable the iso8601-serialization feature to serialize DvbTime as ISO8601/RFC3339 format instead, while still deserializing from the DVB format:
[dependencies]
dvb = { version = "0.7", features = ["iso8601-serialization"] }
This is useful when you need to:
/Date(...) format)Without the feature:
let time = DvbTime::from_str("/Date(1609459200000+0100)/").unwrap();
let json = serde_json::to_string(&time).unwrap();
// json = "\"/Date(1609459200000+0100)/\""
With the feature:
let time = DvbTime::from_str("/Date(1609459200000+0100)/").unwrap();
let json = serde_json::to_string(&time).unwrap();
// json = "\"2021-01-01T00:00:00+01:00\""