Skip to content

Commit

Permalink
Add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV committed Nov 14, 2024
1 parent e32816a commit 749fe13
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ impl Content {
Operation::start(&mut self.buf, operator)
}

/// Return the raw constructed byte stream.
/// Return the buffer of the content stream.
///
/// The buffer is essentially a thin wrapper around two objects:
/// - A [`Limits`] object, which can optionally be used to keep
/// track of data such as the largest used integer or
/// the longest string used in the content streams, which is useful information
/// for some export modes.
/// - The actual underlying data of the content stream, which can be written
/// to a chunk (and optionally apply a filter before doing so).
pub fn finish(mut self) -> Buf {
if self.buf.last() == Some(&b'\n') {
self.buf.inner.pop();
Expand Down

0 comments on commit 749fe13

Please sign in to comment.