You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use PagerState, PollerState instead of Option for callbacks (#2837)
* Use PagerState, PollerState instead of Option for callbacks
For `ItemIterator`, `PageIterator`, and `Poller`, define a bespoke enum that works like an `Option` but that we can add to or redefine as needed, as will most likely be the case for `Poller`.
* Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
* Retain Option<String> option for reconstitution support
---------
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: sdk/core/azure_core/CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@
6
6
7
7
### Breaking Changes
8
8
9
+
-`Pager::from_callback` and `PageIterator::from_callback` define a parameter of type `PagerState<C>` instead of `Option<C>`, where `None` => `Initial` and `Some(C)` => `More(C)`.
10
+
-`Poller::from_callback` defines a parameter of type `PollerState<N>` instead of `Option<N>`, where `None` => `Initial` and `Some(N)` => `More(N)`.
/// Maps a [`PollerState<N>`] to a [`PollerState<U>`] by applying a function to a next link `N` (if `PollerState::More`) or returns `PollerState::Initial` (if `PollerState::Initial`).
0 commit comments