pub struct GetDevicePositionHistoryPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::get_device_position_history_input::Builder,
}
impl<C, M, R> GetDevicePositionHistoryPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::get_device_position_history_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn items(self) -> crate::paginator::GetDevicePositionHistoryPaginatorItems<C, M, R> {
crate::paginator::GetDevicePositionHistoryPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::GetDevicePositionHistoryOutput,
aws_smithy_http::result::SdkError<crate::error::GetDevicePositionHistoryError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetDevicePositionHistoryInputOperationOutputAlias,
crate::output::GetDevicePositionHistoryOutput,
crate::error::GetDevicePositionHistoryError,
crate::input::GetDevicePositionHistoryInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_get_device_position_history_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListDevicePositionsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_device_positions_input::Builder,
}
impl<C, M, R> ListDevicePositionsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_device_positions_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListDevicePositionsPaginatorItems<C, M, R> {
crate::paginator::ListDevicePositionsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListDevicePositionsOutput,
aws_smithy_http::result::SdkError<crate::error::ListDevicePositionsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListDevicePositionsInputOperationOutputAlias,
crate::output::ListDevicePositionsOutput,
crate::error::ListDevicePositionsError,
crate::input::ListDevicePositionsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_device_positions_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListGeofenceCollectionsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_geofence_collections_input::Builder,
}
impl<C, M, R> ListGeofenceCollectionsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_geofence_collections_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListGeofenceCollectionsPaginatorItems<C, M, R> {
crate::paginator::ListGeofenceCollectionsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListGeofenceCollectionsOutput,
aws_smithy_http::result::SdkError<crate::error::ListGeofenceCollectionsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListGeofenceCollectionsInputOperationOutputAlias,
crate::output::ListGeofenceCollectionsOutput,
crate::error::ListGeofenceCollectionsError,
crate::input::ListGeofenceCollectionsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_geofence_collections_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListGeofencesPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_geofences_input::Builder,
}
impl<C, M, R> ListGeofencesPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_geofences_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn items(self) -> crate::paginator::ListGeofencesPaginatorItems<C, M, R> {
crate::paginator::ListGeofencesPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListGeofencesOutput,
aws_smithy_http::result::SdkError<crate::error::ListGeofencesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListGeofencesInputOperationOutputAlias,
crate::output::ListGeofencesOutput,
crate::error::ListGeofencesError,
crate::input::ListGeofencesInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_geofences_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListMapsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_maps_input::Builder,
}
impl<C, M, R> ListMapsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_maps_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListMapsPaginatorItems<C, M, R> {
crate::paginator::ListMapsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListMapsOutput,
aws_smithy_http::result::SdkError<crate::error::ListMapsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListMapsInputOperationOutputAlias,
crate::output::ListMapsOutput,
crate::error::ListMapsError,
crate::input::ListMapsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_maps_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListPlaceIndexesPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_place_indexes_input::Builder,
}
impl<C, M, R> ListPlaceIndexesPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_place_indexes_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListPlaceIndexesPaginatorItems<C, M, R> {
crate::paginator::ListPlaceIndexesPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListPlaceIndexesOutput,
aws_smithy_http::result::SdkError<crate::error::ListPlaceIndexesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListPlaceIndexesInputOperationOutputAlias,
crate::output::ListPlaceIndexesOutput,
crate::error::ListPlaceIndexesError,
crate::input::ListPlaceIndexesInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_place_indexes_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListRouteCalculatorsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_route_calculators_input::Builder,
}
impl<C, M, R> ListRouteCalculatorsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_route_calculators_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListRouteCalculatorsPaginatorItems<C, M, R> {
crate::paginator::ListRouteCalculatorsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListRouteCalculatorsOutput,
aws_smithy_http::result::SdkError<crate::error::ListRouteCalculatorsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListRouteCalculatorsInputOperationOutputAlias,
crate::output::ListRouteCalculatorsOutput,
crate::error::ListRouteCalculatorsError,
crate::input::ListRouteCalculatorsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_route_calculators_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListTrackerConsumersPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_tracker_consumers_input::Builder,
}
impl<C, M, R> ListTrackerConsumersPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_tracker_consumers_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListTrackerConsumersPaginatorItems<C, M, R> {
crate::paginator::ListTrackerConsumersPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListTrackerConsumersOutput,
aws_smithy_http::result::SdkError<crate::error::ListTrackerConsumersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListTrackerConsumersInputOperationOutputAlias,
crate::output::ListTrackerConsumersOutput,
crate::error::ListTrackerConsumersError,
crate::input::ListTrackerConsumersInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_tracker_consumers_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListTrackersPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_trackers_input::Builder,
}
impl<C, M, R> ListTrackersPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_trackers_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListTrackersPaginatorItems<C, M, R> {
crate::paginator::ListTrackersPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListTrackersOutput,
aws_smithy_http::result::SdkError<crate::error::ListTrackersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListTrackersInputOperationOutputAlias,
crate::output::ListTrackersOutput,
crate::error::ListTrackersError,
crate::input::ListTrackersInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_trackers_output_next_token(resp);
if new_token == input.next_token.as_ref() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
input.next_token.as_deref().unwrap_or_default().is_empty()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct GetDevicePositionHistoryPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(GetDevicePositionHistoryPaginator<C, M, R>);
impl<C, M, R> GetDevicePositionHistoryPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::DevicePosition,
aws_smithy_http::result::SdkError<crate::error::GetDevicePositionHistoryError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetDevicePositionHistoryInputOperationOutputAlias,
crate::output::GetDevicePositionHistoryOutput,
crate::error::GetDevicePositionHistoryError,
crate::input::GetDevicePositionHistoryInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| crate::lens::lens_structure_crate_output_get_device_position_history_output_device_positions(page).unwrap_or_default().into_iter())
}
}
pub struct ListDevicePositionsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListDevicePositionsPaginator<C, M, R>);
impl<C, M, R> ListDevicePositionsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::ListDevicePositionsResponseEntry,
aws_smithy_http::result::SdkError<crate::error::ListDevicePositionsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListDevicePositionsInputOperationOutputAlias,
crate::output::ListDevicePositionsOutput,
crate::error::ListDevicePositionsError,
crate::input::ListDevicePositionsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_device_positions_output_entries(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListGeofenceCollectionsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListGeofenceCollectionsPaginator<C, M, R>);
impl<C, M, R> ListGeofenceCollectionsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::ListGeofenceCollectionsResponseEntry,
aws_smithy_http::result::SdkError<crate::error::ListGeofenceCollectionsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListGeofenceCollectionsInputOperationOutputAlias,
crate::output::ListGeofenceCollectionsOutput,
crate::error::ListGeofenceCollectionsError,
crate::input::ListGeofenceCollectionsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_geofence_collections_output_entries(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListGeofencesPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListGeofencesPaginator<C, M, R>);
impl<C, M, R> ListGeofencesPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::ListGeofenceResponseEntry,
aws_smithy_http::result::SdkError<crate::error::ListGeofencesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListGeofencesInputOperationOutputAlias,
crate::output::ListGeofencesOutput,
crate::error::ListGeofencesError,
crate::input::ListGeofencesInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_geofences_output_entries(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListMapsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListMapsPaginator<C, M, R>);
impl<C, M, R> ListMapsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::ListMapsResponseEntry,
aws_smithy_http::result::SdkError<crate::error::ListMapsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListMapsInputOperationOutputAlias,
crate::output::ListMapsOutput,
crate::error::ListMapsError,
crate::input::ListMapsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_maps_output_entries(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListPlaceIndexesPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListPlaceIndexesPaginator<C, M, R>);
impl<C, M, R> ListPlaceIndexesPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::ListPlaceIndexesResponseEntry,
aws_smithy_http::result::SdkError<crate::error::ListPlaceIndexesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListPlaceIndexesInputOperationOutputAlias,
crate::output::ListPlaceIndexesOutput,
crate::error::ListPlaceIndexesError,
crate::input::ListPlaceIndexesInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_place_indexes_output_entries(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListRouteCalculatorsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListRouteCalculatorsPaginator<C, M, R>);
impl<C, M, R> ListRouteCalculatorsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::ListRouteCalculatorsResponseEntry,
aws_smithy_http::result::SdkError<crate::error::ListRouteCalculatorsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListRouteCalculatorsInputOperationOutputAlias,
crate::output::ListRouteCalculatorsOutput,
crate::error::ListRouteCalculatorsError,
crate::input::ListRouteCalculatorsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_route_calculators_output_entries(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListTrackerConsumersPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListTrackerConsumersPaginator<C, M, R>);
impl<C, M, R> ListTrackerConsumersPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
std::string::String,
aws_smithy_http::result::SdkError<crate::error::ListTrackerConsumersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListTrackerConsumersInputOperationOutputAlias,
crate::output::ListTrackerConsumersOutput,
crate::error::ListTrackerConsumersError,
crate::input::ListTrackerConsumersInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_tracker_consumers_output_consumer_arns(
page,
)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListTrackersPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListTrackersPaginator<C, M, R>);
impl<C, M, R> ListTrackersPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::ListTrackersResponseEntry,
aws_smithy_http::result::SdkError<crate::error::ListTrackersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListTrackersInputOperationOutputAlias,
crate::output::ListTrackersOutput,
crate::error::ListTrackersError,
crate::input::ListTrackersInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_trackers_output_entries(page)
.unwrap_or_default()
.into_iter()
})
}
}