Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.3.x] transform-sdk/rust: update rustdocs #16316

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/transform-sdk/rust/core-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,16 @@ impl<'a> From<&'a WrittenRecord<'a>> for BorrowedRecord<'a> {
}
}

/// A trait that can receive a stream of records and output them a destination topic.
/// 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.
pub trait RecordSink {
/// Write a record to the output topic returning any errors.
fn write(&mut self, r: BorrowedRecord<'_>) -> Result<(), WriteError>;
}

/// A writer trait for output transformed records to the destination topic.
/// A struct that writes transformed records to the output topic..
pub struct RecordWriter<'a> {
sink: &'a mut dyn RecordSink,
}
Expand Down
Loading