In this section, we will create a tool that stores location records to a database and query location points for a specific user. To represent a location in the code, we declare the following Location struct:
#[derive(Debug)]struct Location { user_id: String, timestamp: String, longitude: String, latitude: String,}
This struct keeps user_id, which represents the partition key, and timestamp, which represents the sort key.