Skip to content

Commit

Permalink
add docs comments to NoAllocBufferSegmentType variants
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Mar 28, 2024
1 parent f099544 commit bcaac56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions capnp/src/serialize/no_alloc_buffer_segments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ fn read_segment_table(slice: &[u8], options: ReaderOptions) -> Result<ReadSegmen
pub type NoAllocSliceSegments<'b> = NoAllocBufferSegments<&'b [u8]>;

enum NoAllocBufferSegmentType {
/// The buffer contains a single segment, with bounds given by the two
/// `usize` parameters. The first parameter gives the byte offset of the
/// start of the segment, and the second parameter gives the byte offset
/// of its end.
SingleSegment(usize, usize),

/// The buffer contains multiple segments. In this case, the segment table
/// needs to be re-parsed on each call to `get_segment()`.
MultipleSegments,
}

Expand Down

0 comments on commit bcaac56

Please sign in to comment.