Rust SDK 0.8.0
Added
- Added
Dictionary::try_get, which returns aResult<String, LookupError>, allowing programs to explicitly handle lookup failures. - Added an
Othervariant todictionary::LookupError. - Added
closetoRequestHandle, andResponseHandle. - Added the
non_exhaustiveenumsHandleErrorandHandleKindfor the low level handle interface. - Added
SatelliteandUltraBroadbandvariants forConnSpeedandConnTypein the geolocation interface. - Added
Othervariants forConnSpeed,ConnType,Continent,ProxyDescription, andProxyTypein the geolocation interface for cases where the geolocation database contains variants that are newer than the current SDK definitions.
Fixed
- Fixed geolocation calls returning no data when only partial data was available for a requested IP address.
Changed
- The Minimum Supported Rust Version (MSRV) for the
fastlycrate is now 1.54.0. BodyHandle::closenow works for non-streaming bodies in addition to the already-closeable streaming bodies.BodyHandle,RequestHandleandResponseHandlenow callcloseas part of theirDropimplementation when they go out of scope, saving a small amount of leaked memory for services that make multiple HTTP requests.- Exported unsafe low-level interfaces for creating
BodyHandles. - The functions
is_validandis_invalidare nowconstforBodyHandle,RequestHandle, andResponseHandle Geo::utc_offsetnow returnsOption<time::UtcOffset>instead ofOption<chrono::FixedOffset>.ConnSpeed,ConnType,ProxyDescription, andProxyTypeare nownon_exhaustive.- Exported the
fastly::dictionarymodule. Its exported typesDictionaryandLookupErrorremain accessible through other paths, but this module provides a way to import them together.
Removed
- Removed
CopyfromConnSpeed,ConnType,Continent,ProxyDescriptionandProxyTypeinside thegeomodule; their newOthervariants contain an arbitraryStringwhich is notCopyable. The strings theOthervariant might contain are small, so these enums (andGeoitself) can be efficiently cloned.
Prior change: Rust SDK 0.7.3
Following change: Rust SDK 0.8.1