pub fn parse_vec_with_indices<T>(&mut self, original: Buffer) -> Result<(Vec<T>,Vec<u32>), EndOfBufferError>
        where T: Parse<'a> {

        let original_len = original.inner.len() as u32;
        let count = self.parse_compact_size()?;
        let mut result:     Vec<T>   = Vec::with_capacity(count);
        let mut result_idx: Vec<u32> = Vec::with_capacity(count);
        for _ in 0..count {
            result_idx.push(original_len - self.inner.len() as u32);
            result.push(try!(T::parse(self)));
        }
        Ok((result, result_idx))

    }
/// Reads a compact-size prefixed vector (like Vec::parse), but also returns a
/// vector if indices since the start of the buffer
Reads a compact-size prefixed vector (like Vec::parse), but also returns a
vector if indices since the start of the buffer
Reads a compact - size prefixed vector ( like Vec :: parse ) but also returns a vector if indices since the start of the buffer
pub fn parse_vec_with_indices<T>(&mut self, original: Buffer) -> Result<(Vec<T>,Vec<u32>), EndOfBufferError>
        where T: Parse<'a> {
        let original_len = original.inner.len() as u32;
        let count = self.parse_compact_size()?;
        let mut result:     Vec<T>   = Vec::with_capacity(count);
        let mut result_idx: Vec<u32> = Vec::with_capacity(count);
        for _ in 0..count {
            result_idx.push(original_len - self.inner.len() as u32);
            result.push(try!(T::parse(self)));
        }
        Ok((result, result_idx))
    }
pub fn parse_vec_with_indices < T > ( & mut self , original : Buffer ) -> Result < ( Vec < T > , Vec < u32 > ) , EndOfBufferError > where T : Parse < ' a > { let original_len = original . inner . len ( ) as u32 ; let count = self . parse_compact_size ( ) ? ; let mut result : Vec < T > = Vec :: with_capacity ( count ) ; let mut result_idx : Vec < u32 > = Vec :: with_capacity ( count ) ; for _ in 0 .. count { result_idx . push ( original_len - self . inner . len ( ) as u32 ) ; result . push ( try ! ( T parse ( self ) ) ) ; } Ok ( ( result , result_idx ) ) }
Reads a compact-size prefixed vector (like Vec::parse), but also returns a
vector if indices since the start of the buffer
Reads a compact - size prefixed vector ( like Vec :: parse ) but also returns a vector if indices since the start of the buffer
&mut self
original
Buffer
&mut self
original
Buffer