1
Fork 0
This commit is contained in:
Alex Helfet 2017-12-29 00:53:14 +00:00
parent 2cbf1bbb60
commit 0df4bb07a1
2 changed files with 4 additions and 3 deletions

View file

@ -342,7 +342,7 @@ const HEADER_LEN: usize = 0;
const FOOTER_LEN: usize = 1; const FOOTER_LEN: usize = 1;
/// Encode the supplied payload data as a frame at the beginning of /// Encode the supplied payload data as a frame at the beginning of
/// the supplied buffer `dest`. /// the supplied buffer `dest`. Available from `no_std` crates.
/// ///
/// Returns the number of bytes it has written to the buffer. /// Returns the number of bytes it has written to the buffer.
/// ///
@ -388,7 +388,7 @@ pub fn encode_to_writer<W: Write>(p: &Payload, w: &mut W) -> Result<usize> {
} }
/// Decode the supplied encoded frame, placing the payload at the /// Decode the supplied encoded frame, placing the payload at the
/// beginning of the supplied buffer `dest`. /// beginning of the supplied buffer `dest`. Available from `no_std` crates.
/// ///
/// When reading from a stream, the caller can continue reading data /// When reading from a stream, the caller can continue reading data
/// and buffering it until a `FRAME_END_SYMBOL` is read, then pass the /// and buffering it until a `FRAME_END_SYMBOL` is read, then pass the

View file

@ -104,6 +104,7 @@ use std::io::{Read, Write};
/// Serializes and encodes the supplied value `v` into destination /// Serializes and encodes the supplied value `v` into destination
/// buffer `dest`, using `ser_buf` as a temporary serialization buffer. /// buffer `dest`, using `ser_buf` as a temporary serialization buffer.
/// Available from `no_std` crates.
/// ///
/// Returns the number of bytes written to the beginning of `dest`. /// Returns the number of bytes written to the beginning of `dest`.
/// ///
@ -134,7 +135,7 @@ pub fn encode_to_slice<T: DeserializeOwned + Serialize>(
/// Decodes the supplied encoded frame `e`, then deserializes its /// Decodes the supplied encoded frame `e`, then deserializes its
/// payload as a value of type `T`, using `de_buf` as a temporary /// payload as a value of type `T`, using `de_buf` as a temporary
/// deserialization buffer. /// deserialization buffer. Available from `no_std` crates.
/// ///
/// Returns the deserialized value. /// Returns the deserialized value.
/// ///