Skip to content

Commit f3a537c

Browse files
authored
Support reconstituting pageables (#2748)
* Support reconstituting pageables Adds PageIterator::with_next_link to support general guidelines: https://azure.github.io/azure-sdk/general_design.html#general-pagination-expose-paging-apis * Fix lint * Use `continuation_token` instead of `next` for cross-language consistency
1 parent a7d1c34 commit f3a537c

File tree

9 files changed

+299
-71
lines changed

9 files changed

+299
-71
lines changed

eng/scripts/verify-dependencies.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ use std::{
2020
static EXEMPTIONS: &[(&str, &str)] = &[
2121
("azure_core_test", "dotenvy"),
2222
("azure_template", "serde"),
23-
("azure_core_tracing_opentelemetry", "opentelemetry"),
24-
("azure_core_tracing_opentelemetry", "opentelemetry_sdk"),
25-
("azure_core_tracing_opentelemetry", "tracing-opentelemetry"),
23+
("azure_core_opentelemetry", "opentelemetry"),
24+
("azure_core_opentelemetry", "opentelemetry_sdk"),
25+
("azure_core_opentelemetry", "tracing-opentelemetry"),
2626
];
2727

2828
fn main() {

sdk/core/azure_core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
### Features Added
66

77
- Added `get_async_runtime()` and `set_async_runtime()` to allow customers to replace the asynchronous runtime used by the Azure SDK.
8+
- Added `PageIterator::continuation_token()` and `PageIterator::with_continuation_token()` to support reconstructing a `PageIterator` in another process or on another machine to continue paging.
89

910
### Breaking Changes
1011

1112
- `azure_core::http::Pipeline::new` now takes an `azure_core::http::ClientOptions` which is defined in `azure_core`, but convertible to `typespec_client_core::http::ClientOptions`.
1213
- Moved `process::Executor` to `azure_identity`.
1314
- Removed `Pipeline::replace_policy`.
1415
- Renamed `azure_core::date` to `azure_core::time` and added `azure_core::time::Duration` as the standard "duration" type for the SDK.
16+
- Renamed `PagerResult::More { next }` to `continuation`.
1517
- Renamed `TelemetryOptions` to `UserAgentOptions`.
1618
- Renamed `TelemetryPolicy` to `UserAgentPolicy`.
1719

sdk/core/azure_core/src/http/pager.rs

Lines changed: 280 additions & 54 deletions
Large diffs are not rendered by default.

sdk/cosmos/azure_data_cosmos/src/feed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl<T> From<FeedPage<T>> for PagerResult<FeedPage<T>, String> {
7070
match continuation {
7171
Some(continuation) => PagerResult::More {
7272
response: value,
73-
next: continuation,
73+
continuation,
7474
},
7575
None => PagerResult::Done { response: value },
7676
}

sdk/keyvault/azure_security_keyvault_certificates/src/generated/clients/certificate_client.rs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/azure_security_keyvault_keys/src/generated/clients/key_client.rs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/azure_security_keyvault_secrets/src/generated/clients/secret_client.rs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/storage/azure_storage_blob/src/generated/clients/blob_service_client.rs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)