I am very new to Rust and trying to get a bit of code working that can push a record to a kinesis firehose stream.
struct AuditRecord{
user_id : String,
request : Value,
request_id : String,
timestamp_raw : i64,
}
...
let client = KinesisClient::new(Region::UsEast1);
let record = PutRecordInput{
partition_key : requestId.to_string(),
stream_name : streamName,
data : auditRecord
};
When I tried this it wants the data in bytes::bytes::Bytes
but I am unclear as to how to convert my struct to a bytes::bytes::Bytes
representation. Any examples of how to go about this would be appreciated.
For clarification I am using
rusoto = "0.24.2"
rusoto_kinesis = "0.43.0"
rusoto_core = "0.43.0"
Also if anyone know of a good place to see real examples of how to use rusoto to talk with varios AWS entities that would be appreciated.