Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Nov 15, 2023
1 parent 4cb9abc commit 6c28dc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions capnp/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ where
}

/// Like `try_read_message()`, but does not allocate any memory.
/// Stores the message in `buffer`. Returns a `BufferNotLargeEnough`
/// error if the buffer is not large enough.
pub fn try_read_message_no_alloc<R>(
mut read: R,
options: message::ReaderOptions,
Expand Down Expand Up @@ -387,6 +389,8 @@ where
}

/// Like `read_message()`, but does not allocate.
/// Stores the message in `buffer`. Returns a `BufferNotLargeEnough`
/// error if the buffer is not large enough.
pub fn read_message_no_alloc<R>(
read: R,
options: message::ReaderOptions,
Expand Down
4 changes: 4 additions & 0 deletions capnp/src/serialize_packed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ where
}

/// Like read_message(), but does not allocate.
/// Stores the message in `buffer`. Returns a `BufferNotLargeEnough`
/// error if the buffer is not large enough.
pub fn read_message_no_alloc<R>(
read: R,
options: message::ReaderOptions,
Expand All @@ -268,6 +270,8 @@ where
}

/// Like try_read_message(), but does not allocate.
/// Stores the message in `buffer`. Returns a `BufferNotLargeEnough`
/// error if the buffer is not large enough.
pub fn try_read_message_no_alloc<R>(
read: R,
options: message::ReaderOptions,
Expand Down

0 comments on commit 6c28dc8

Please sign in to comment.