dynamo_subscriber/types/outputs.rs
1use super::Shard;
2
3use aws_sdk_dynamodbstreams::types::Record;
4
5/// An output representation of get shards operation.
6#[derive(Debug, Clone)]
7pub struct GetShardsOutput {
8 /// The shards that are retrieved by the operation.
9 pub shards: Vec<Shard>,
10
11 /// The shard ID of the item where the operation stopped, inclusive of the previous result set.
12 /// Use this value to start a new operation, excluding this value in the new request.
13 ///
14 /// If `last_shard_id` is None, then the "last page" of results has been processed and
15 /// there is currently no more data to be retrieved.
16 ///
17 /// If `last_shard_id` is Some, it does not necessarily mean that there is more data
18 /// in the result set. The only way to know when you have reached the end of
19 /// the result set is when `last_shard_id` is None.
20 pub last_shard_id: Option<String>,
21}
22
23/// An output representation of get records operation.
24#[derive(Debug, Clone)]
25pub struct GetRecordsOutput {
26 /// The shard that the records are retrieved from and has renewed shard iterator
27 /// for next `get_records` operation.
28 /// The shard will be None, if the renewed shard iterator is None. Because the None shard
29 /// iterator means no more records will be retrieved from the shard.
30 pub shard: Option<Shard>,
31
32 /// The records that are retrieved by the operation.
33 pub records: Vec<Record>,
34}