Bad code snippet:
pub struct FeedPage<T> {}
What it should do:
The current Rust guidance is out of date. The feedback in APIView correctly points to the cited paging/model guidelines, but those guidelines no longer reflect the intended shape for Rust paging types in azure_data_cosmos. Please update the official Rust guideline so it clearly describes the current requirements for page types (including azure_core::Model and IntoIterator behavior, if still applicable).
Good code snippet:
pub struct FeedPage<T> {
// page fields
}
impl<T> azure_core::Model for FeedPage<T> {
// current expected implementation
}
impl<T> IntoIterator for FeedPage<T> {
type Item = T;
type IntoIter = std::vec::IntoIter<T>;
fn into_iter(self) -> Self::IntoIter {
// iterate over page items
}
}
Bad code snippet:
What it should do:
The current Rust guidance is out of date. The feedback in APIView correctly points to the cited paging/model guidelines, but those guidelines no longer reflect the intended shape for Rust paging types in
azure_data_cosmos. Please update the official Rust guideline so it clearly describes the current requirements for page types (includingazure_core::ModelandIntoIteratorbehavior, if still applicable).Good code snippet: