vector/sinks/aws_kinesis/
record.rs1use std::future::Future;
2
3use aws_smithy_runtime_api::client::{orchestrator::HttpResponse, result::SdkError};
4use bytes::Bytes;
5
6use super::KinesisResponse;
7pub trait Record {
10 type T;
11
12 fn new(payload_bytes: &Bytes, partition_key: &str) -> Self;
14
15 fn encoded_length(&self) -> usize;
17
18 fn get(self) -> Self::T;
20}
21
22pub trait SendRecord {
24 type T;
25 type E;
26
27 fn send(
29 &self,
30 records: Vec<Self::T>,
31 stream_name: String,
32 ) -> impl Future<Output = Result<KinesisResponse, SdkError<Self::E, HttpResponse>>> + Send;
33}