mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-03-01 06:53:10 -08:00
chore(doc): Add a module summary for LengthPrefixEncoder
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
//! Utilities for encoding length-prefixed messages that can be transmitted via I/O streams.
|
||||||
|
//!
|
||||||
|
//! Messages are prefixed with an unsigned 64-bit little-endian length header, followed by the
|
||||||
|
//! message payload. Each [`LengthPrefixEncoder`] maintains internal buffers and additional state for as-yet
|
||||||
|
//! incomplete messages.
|
||||||
|
//!
|
||||||
|
//! It also performs sanity checks and handles typical error conditions that may be encountered
|
||||||
|
//! when writing structured data to an output sink (such as stdout or an active socket connection).
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
borrow::{Borrow, BorrowMut},
|
borrow::{Borrow, BorrowMut},
|
||||||
cmp::min,
|
cmp::min,
|
||||||
|
|||||||
Reference in New Issue
Block a user