Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit f4bb3ed

Browse files
authored
feat: add accessors for AppendRecord (#305)
1 parent a853fb4 commit f4bb3ed

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/types.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,6 +2817,21 @@ impl AppendRecord {
28172817
..self
28182818
}
28192819
}
2820+
2821+
/// Get the body of this record.
2822+
pub fn body(&self) -> &[u8] {
2823+
&self.body
2824+
}
2825+
2826+
/// Get the headers of this record.
2827+
pub fn headers(&self) -> &[Header] {
2828+
&self.headers
2829+
}
2830+
2831+
/// Get the timestamp of this record.
2832+
pub fn timestamp(&self) -> Option<u64> {
2833+
self.timestamp
2834+
}
28202835
}
28212836

28222837
impl From<AppendRecord> for api::stream::proto::AppendRecord {

0 commit comments

Comments
 (0)