pub fn convert_records<'b>(
        records: std::vec::Vec<PcapRecord<'b>>,
    ) -> std::vec::Vec<PcapRecord<'b>> {
        let mut records = records;
        let mut results = vec![];

        loop {
            if let Some(mut r) = records.pop() {
                match r.extract_flow() {
                    Ok(f) => {
                        r.flow = Some(f);
                        results.push(r);
                    }
                    Err(e) => {
                        debug!("Failed to extract stream: {}", e);
                    }
                }
            } else {
                break;
            }
        }

        results
    }
///
/// Utility function to convert a vector of records to flows, unless an error is encountered in stream conversion
///
Utility function to convert a vector of records to flows, unless an error is encountered in stream conversion
Utility function to convert a vector of records to flows unless an error is encountered in stream conversion
pub fn convert_records<'b>(
        records: std::vec::Vec<PcapRecord<'b>>,
    ) -> std::vec::Vec<PcapRecord<'b>> {
        let mut records = records;
        let mut results = vec![];
        loop {
            if let Some(mut r) = records.pop() {
                match r.extract_flow() {
                    Ok(f) => {
                        r.flow = Some(f);
                        results.push(r);
                    }
                    Err(e) => {
                        debug!("Failed to extract stream: {}", e);
                    }
                }
            } else {
                break;
            }
        }
        results
    }
pub fn convert_records < ' b > ( records : std :: vec :: Vec < PcapRecord < ' b > > , ) -> std :: vec :: Vec < PcapRecord < ' b > > { let mut records = records ; let mut results = vec ! [ ] ; loop { if let Some ( mut r ) = records . pop ( ) { match r . extract_flow ( ) { Ok ( f ) => { r . flow = Some ( f ) ; results . push ( r ) ; } Err ( e ) => { debug ! ( " " e ) ; } } } else { break ; } } results }
Utility function to convert a vector of records to flows, unless an error is encountered in stream conversion
Utility function to convert a vector of records to flows unless an error is encountered in stream conversion
records
std::vec::Vec<PcapRecord<'b>>