Crate dhl_api

Source

Structs§

DHLPackageItem
Parcel item elements
DHLPackageItemDetails
Parcel item details
DHLPackageItemHistory
Parcel history
DHLPackageItemHistoryEvent
Parcel history events (where did you come from, where did you go?)
DHLPackageNotFoundInfo
Information why a parcel tracking code may not have been found. This is only set when no tracking information was found (yet?).
DHLPackageStatus
Root element, contains a vector with parcel items

Functions§

get_dhl_package_from_html
Try to parse a HTML body and look for the shipping information, usually you need not to call this unless you wish to use your own HTTP client or backend URL or whatever other wizardry you’re into.
get_dhl_package_status
Returns a DHLPackageStatus struct. You should check if it actually has any data with: DHLPackageStatus.items[0].package_not_found.has_some()
DHLPackageItem.package_not_found will only be set if no package was found for that tracking code.