pub fn write_frames<W, I>(w: &mut W, frames: I) -> Result<usize>Expand description
Writes a sequence of frames to the given writer.
Each frame is serialized using write_frame and written in order.
§Arguments
w- The output writer.frames- An iterable sequence ofFramevalues.
§Returns
The number of frames successfully written.
§Errors
Returns an error if writing to the output fails or if serializing any frame fails.
§Notes
This function consumes the provided iterator.
§Examples
ⓘ
let frames = vec![frame1, frame2, frame3];
let written = write_frames(&mut writer, frames)?;
assert_eq!(written, 3);