Skip to content

Commit

Permalink
Document IOReader and EIOReader constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Spartan2909 committed Nov 27, 2024
1 parent a31c81b commit f736abe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/postcard/src/de/flavors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ pub mod io {
where
T: crate::eio::Read,
{
/// Create a new [`EIOReader`] from a reader and a buffer.
///
/// `buff` must have enough space to hold all data read during the deserialisation.
pub fn new(reader: T, buff: &'de mut [u8]) -> Self {
Self {
reader,
Expand Down Expand Up @@ -328,6 +331,9 @@ pub mod io {
where
T: std::io::Read,
{
/// Create a new [`IOReader`] from a reader and a buffer.
///
/// `buff` must have enough space to hold all data read during the deserialisation.
pub fn new(reader: T, buff: &'de mut [u8]) -> Self {
Self {
reader,
Expand Down

0 comments on commit f736abe

Please sign in to comment.