You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lib.rs
    path of file: ./repos/wormhole/sdk/rust/serde_wormhole/src
    
    the code of the file until where you have to start completion: //! Serialize and deserialize rust values from the VAA payload wire format.
//!
/
    
pub fn from_reader<R: Read, T: DeserializeOwned>(mut r: R) -> Result<T, Error> {
    // We can do something smarter here by making the deserializer generic over the reader (see
    // serde_json::Deserializer) but for now this is probably good enough.
    let mut buf = Vec::with_capacity(128);
    r.read_to_end(&mut buf)?;

    from_slice(&buf)
}