fn read_vector<'a, F, T>(
    input: &mut untrusted::Reader<'a>,
    f: F,
) -> Result<Option<T>, untrusted::EndOfInput>
where
    F: Fn(&mut untrusted::Reader<'a>) -> Result<Option<T>, untrusted::EndOfInput>,
    T: 'a,
{
    let length = read_u16(input)?;

    // ClientHello has to be small for compatibility with many deployed
    // implementations, so if it is (relatively) huge, we might not be looking
    // at TLS traffic, and we're definitely not looking at proxy-terminated
    // traffic, so bail out early.
    if length > 8192 {
        return Ok(None);
    }
    let r = input.read_bytes(usize::from(length))?;
    r.read_all(untrusted::EndOfInput, f)
}
/// Reads a `u16` vector, which is formatted as a big-endian `u16` length
/// followed by that many bytes.
Reads a `u16` vector, which is formatted as a big-endian `u16` length
followed by that many bytes.
Reads a ` u16 ` vector which is formatted as a big - endian ` u16 ` length followed by that many bytes .
fn read_vector<'a, F, T>(
    input: &mut untrusted::Reader<'a>,
    f: F,
) -> Result<Option<T>, untrusted::EndOfInput>
where
    F: Fn(&mut untrusted::Reader<'a>) -> Result<Option<T>, untrusted::EndOfInput>,
    T: 'a,
{
    let length = read_u16(input)?;
    // ClientHello has to be small for compatibility with many deployed
    // implementations, so if it is (relatively) huge, we might not be looking
    // at TLS traffic, and we're definitely not looking at proxy-terminated
    // traffic, so bail out early.
    if length > 8192 {
        return Ok(None);
    }
    let r = input.read_bytes(usize::from(length))?;
    r.read_all(untrusted::EndOfInput, f)
}
fn read_vector < ' a , F , T > ( input : & mut untrusted :: Reader < ' a > , f : F , ) -> Result < Option < T > , untrusted :: EndOfInput > where F : Fn ( & mut untrusted :: Reader < ' a > ) -> Result < Option < T > , untrusted :: EndOfInput > , T : ' a , { let length = read_u16 ( input ) ? ; // ClientHello has to be small for compatibility with many deployed // implementations, so if it is (relatively) huge, we might not be looking // at TLS traffic, and we're definitely not looking at proxy-terminated // traffic, so bail out early. if length > 8192 { return Ok ( None ) ; } let r = input . read_bytes ( usize :: from ( length ) ) ? ; r . read_all ( untrusted :: EndOfInput , f ) }
Reads a `u16` vector, which is formatted as a big-endian `u16` length
followed by that many bytes.
Reads a ` u16 ` vector which is formatted as a big - endian ` u16 ` length followed by that many bytes .
input
&mut untrusted::Reader<'a>
f
F
input
&mut untrusted::Reader<'a>
f
F