Microsoft Azure SDK for Rust
This minor release should help using Box<dyn Client>
to be more ergonomic.
This release adds the support for Bearer Token to Azure Storage crates. This means you can use Azure AAD tokens instead of using the access keys or the SAS keys.
The API is the same so you just have to instantiate the Client
with the with_bearer_token
new function in order to use this new functionality.
let client = client::with_bearer_token(account, bearer_token);
Provided you have the necessary privileges your calls will succeed.
In order to make the switch possible I switched the Client
from struct from trait. The only breaking change is that you can no longer create a new instance of the client with Client::new
- that is the new
function of the struct Client
- with client::new
- the new
function of the module client
. In other words just de-capitalize the Client word (and remove the unnecessary unwrap at the end).
This is a major refactor of the CosmosDB crate. Every client is now exposed as a trait. In practice there are just a few breaking changes (such renaming with_database
with with_database_client
) but the crate now supports both owning clients and reference ones. This means you can choose either depending of the circumstances with no penalty.
There are still a few of rough edges but the overall user experience should be good.
This release adds two important functionalities:
This release adds support for user defined functions (UDFs) to the CosmosDB crate.
This is a breaking version as it changes how the Document
is created and defined. Previously the Document
had the notion of id
field, treated separately from the rest of the serialized struct. This made for good APIs but, in practice, clashed with the fact that not every query returns a Document
(as seen in the UDFs example). Now the Crate does not force any id
so it's up to you to include it if you want. Be mindful that Azure CosmosDB will add an id
field even if you do not (as of now a GUID but it can change) so I suggest you to handle it.
This release includes: