usestd::io::Result;usestd::io::Write;/// Generic writer for data destinations.
pubtraitWriter{/// Underlying writer type.
typeW: Write;/// The frame type consumed by this writer.
typeFrameLike;/// Construct a new writer from the underlying writer.
fnnew(writer:Self::W)->Self;}/// A writer that can write one logical frame at a time.
pubtraitFrameWriter: Writer {/// Write a single frame to the stream.
fnwrite_frame(&mutself, frame:&Self::FrameLike)->Result<()>;}