azure_data_cosmos@0.31.0
Pre-release
Pre-release
0.31.0 (2026-02-25)
Features Added
- Added
with_excluded_regionstoItemOptionsfor additional regional routing options. (#3602) - Added
effective_preferred_regionsto the client, ensuring multi-region accounts use all regions for cross-regional availability without supplying regional preferences to their client. (#3602) - Added basic multi-region writes support. (#3482 and #3495)
- Added new
CosmosResponsethat wrapsazure_core::Responsefor all operations except queries. (#3622) - Added transactional batch support for executing multiple operations atomically within the same partition key. (#3664)
- Added fault injection support for testing cosmosdb clients in disaster scenarios. Fault injection is behind the feature flag
fault_injection. (#3599)
Breaking Changes
- Changed our minimum supported Rust version (MSRV) from 1.85 to 1.88.
- Removed
ContainerClient::patch_item,PatchDocument, andPatchOperationtemporarily to redesign the PATCH API for safe idempotency. Use a Read/Modify/Replace model with ETag-based optimistic concurrency instead. - Changed return type of query methods from
FeedPager<T>(an alias forItemIterator<FeedPage<T>, String>) toFeedItemIterator<T>, which implementsStream<Item = Result<T>>and providesinto_pages()for page-level access. (#3515) - Introduced
CosmosClientBuilderfor constructingCosmosClientinstances, replacing constructor-based API. Removedconsistency_level,priority,throughput_bucket,excluded_regions,SessionRetryOptions, triggers, andIndexingDirectivefrom options. SimplifiedCosmosAccountReferenceto takeCosmosAccountEndpointdirectly. Made option struct fields private with getters andwith_*setters. (#3744) - Removed
with_application_preferred_regionsAPI. Usewith_application_regionto set the Azure region the app is executing in (or the closest region to the actual location you're running in); the SDK generates preferred regions by geographic proximity. (#3796) - Made
CosmosClientBuilder::build()andDatabaseClient::container_client()async to prepare for future cache population (account, collection, partition key range caches). - Support for
wasm32-unknown-unknownhas been removed (#3377)