pub trait RecordSink {
// Required method
fn write(
&mut self,
r: BorrowedRecord<'_>,
opts: WriteOptions<'_>,
) -> Result<(), WriteError>;
}
Expand description
An internal trait that can receive a stream of records and output them a destination topic.
As a user of this framework you should not need to implement this, unless you’re writing a mock implementation for testing.
Required Methods§
Sourcefn write(
&mut self,
r: BorrowedRecord<'_>,
opts: WriteOptions<'_>,
) -> Result<(), WriteError>
fn write( &mut self, r: BorrowedRecord<'_>, opts: WriteOptions<'_>, ) -> Result<(), WriteError>
Write a record with options, returning any errors.