Trait pb_jelly::PbBufferWriter[][src]

pub trait PbBufferWriter: Write {
    fn write_buffer<B: PbBuffer>(&mut self, buf: &B) -> Result<()>;
}
Expand description

All concrete types used for serialization should implement PbBufferWriter in order to support serializing lazily-evaluated types without copies.

Required methods

Attempt to write a lazily-evaluated buffer into Self. If the underlying [B] is not zero-copy-supported by the PbBufferWriter, this should read/copy the bytes out from [B].

Implementations on Foreign Types

Note: this implementation freely copies the data out of buf.

Note: this implementation freely copies the data out of buf.

Implementors