Docs.
This commit is contained in:
parent
2cbf1bbb60
commit
0df4bb07a1
2 changed files with 4 additions and 3 deletions
|
@ -342,7 +342,7 @@ const HEADER_LEN: usize = 0;
|
|||
const FOOTER_LEN: usize = 1;
|
||||
|
||||
/// 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.
|
||||
///
|
||||
|
@ -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
|
||||
/// 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
|
||||
/// and buffering it until a `FRAME_END_SYMBOL` is read, then pass the
|
||||
|
|
|
@ -104,6 +104,7 @@ use std::io::{Read, Write};
|
|||
|
||||
/// Serializes and encodes the supplied value `v` into destination
|
||||
/// 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`.
|
||||
///
|
||||
|
@ -134,7 +135,7 @@ pub fn encode_to_slice<T: DeserializeOwned + Serialize>(
|
|||
|
||||
/// Decodes the supplied encoded frame `e`, then deserializes its
|
||||
/// 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.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue