Function encode_frames
pub fn encode_frames<S: Sink>(ops: &Ops, sink: S) -> Result<(), S::Error>Available on crate feature
alloc only.Expand description
Encodes ops as one CRC frame into sink.
This is the write-side counterpart of
Reader: the bytes it produces replay
through the reader to reapply every op. The whole batch becomes one frame.
The header’s 8-byte length field can address any in-memory batch, so there
is no size limit to split around.
Writes nothing if ops is empty.
§Errors
Returns the sink’s error if it cannot take the frame.