Trait quick_protobuf::message::MessageRead [] [src]

pub trait MessageRead: Sized {
    fn from_reader<R: Read>(r: &mut Reader<R>) -> Result<Self>;

    fn from_file<P: AsRef<Path>>(p: P) -> Result<Self> { ... }
    fn from_file_for_speed<P: AsRef<Path>>(p: P) -> Result<Self> { ... }
}

A trait to handle deserialization based on parsed Fields

Required Methods

Creates Self from a Reader

This method is generally automatically implemented when generating code out of .proto file

Provided Methods

Creates Message out of a file

Convenient method for the top Message in the hierarchy of binary messages

Creates Message out of a file

Convenient method for the top Message in the hierarchy of binary messages

The file is entirely read into memory before being parsed, which boost performances but uses twice as much of memory

Implementors