pub fn decode_header<T: Buf>(
    table: &DynamicTable,
    buf: &mut T,
) -> Result<(Vec<HeaderField>, bool), Error> {
    let (required_ref, base) =
        HeaderPrefix::decode(buf)?.get(table.total_inserted(), table.max_mem_size())?;

    if required_ref > table.total_inserted() {
        return Err(Error::MissingRefs(required_ref));
    }

    let decoder_table = table.decoder(base);

    let mut fields = Vec::new();
    while buf.has_remaining() {
        fields.push(parse_header_field(&decoder_table, buf)?);
    }

    Ok((fields, required_ref > 0))
}
// Decode a header bloc received on Request of Push stream. (draft: 4.5)
Decode a header bloc received on Request of Push stream.
Decode a header bloc received on Request of Push stream .
pub fn decode_header<T: Buf>(
    table: &DynamicTable,
    buf: &mut T,
) -> Result<(Vec<HeaderField>, bool), Error> {
    let (required_ref, base) =
        HeaderPrefix::decode(buf)?.get(table.total_inserted(), table.max_mem_size())?;
    if required_ref > table.total_inserted() {
        return Err(Error::MissingRefs(required_ref));
    }
    let decoder_table = table.decoder(base);
    let mut fields = Vec::new();
    while buf.has_remaining() {
        fields.push(parse_header_field(&decoder_table, buf)?);
    }
    Ok((fields, required_ref > 0))
}
pub fn decode_header < T : Buf > ( table : & DynamicTable , buf : & mut T , ) -> Result < ( Vec < HeaderField > , bool ) , Error > { let ( required_ref , base ) = HeaderPrefix :: decode ( buf ) ? . get ( table . total_inserted ( ) , table . max_mem_size ( ) ) ? ; if required_ref > table . total_inserted ( ) { return Err ( Error :: MissingRefs ( required_ref ) ) ; } let decoder_table = table . decoder ( base ) ; let mut fields = Vec :: new ( ) ; while buf . has_remaining ( ) { fields . push ( parse_header_field ( & decoder_table , buf ) ? ) ; } Ok ( ( fields , required_ref > 0 ) ) }
Decode a header bloc received on Request of Push stream.
Decode a header bloc received on Request of Push stream .
table
&DynamicTable
buf
&mut T