Set multiple failed message IDs at once. This is a convenience method for setting all batch item failures in one call. It replaces any previously registered failures. Besides `item_identifiers`, the generated struct will use default field values for [`BatchItemFailure`]. Important**: This feature requires `FunctionResponseTypes: ReportBatchItemFailures` to be enabled in your Lambda function's S
(&mut self, message_ids: I)
| 266 | /// } |
| 267 | /// ``` |
| 268 | pub fn set_failures<I, S>(&mut self, message_ids: I) |
| 269 | where |
| 270 | I: IntoIterator<Item = S>, |
| 271 | S: Into<String>, |
| 272 | { |
| 273 | self.batch_item_failures = message_ids |
| 274 | .into_iter() |
| 275 | .map(|id| BatchItemFailure { |
| 276 | item_identifier: id.into(), |
| 277 | ..Default::default() |
| 278 | }) |
| 279 | .collect(); |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | #[non_exhaustive] |
no test coverage detected