You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following situation, a field in my protobuf (when stored in rust) needs encoding to bytes before it can get stored in the protobuf. I would like to avoid the temporary allocation of storing it in a Vec, and directly write it into the WriterBackend.
// Code I would like to writefnwrite_message<W:WriterBackend>(&self,w:&mutWriter<W>) -> quick_protobuf::Result<()>{
w.write_with_tag(10, |w| {let len = self.foo.encoded_len();
w.write_varint(len asu64)?;self.foo.write(w)?;Ok(())})?;// ..Ok(())}
The text was updated successfully, but these errors were encountered:
I have the following situation, a field in my protobuf (when stored in rust) needs encoding to bytes before it can get stored in the protobuf. I would like to avoid the temporary allocation of storing it in a
Vec
, and directly write it into theWriterBackend
.The text was updated successfully, but these errors were encountered: