pub fn new<'a, T>(trace_points: T) -> Spec
    where
        T: IntoIterator<Item = &'a str>
    {
        let name_value: HashMap<String, u16> = trace_points.into_iter()
            .map(|s| s.to_string())
            .zip(1..) // assign values to each trace point
            .collect();
        let value_name = name_value.iter()
            .map(|(n, v)| (*v, n.clone()))
            .collect();

        Spec {
            name_value,
            value_name,
        }
    }
/// Create a new specification definition.
Create a new specification definition.
Create a new specification definition .
pub fn new<'a, T>(trace_points: T) -> Spec
    where
        T: IntoIterator<Item = &'a str>
    {
        let name_value: HashMap<String, u16> = trace_points.into_iter()
            .map(|s| s.to_string())
            .zip(1..) // assign values to each trace point
            .collect();
        let value_name = name_value.iter()
            .map(|(n, v)| (*v, n.clone()))
            .collect();
        Spec {
            name_value,
            value_name,
        }
    }
pub fn new < ' a , T > ( trace_points : T ) -> Spec where T : IntoIterator < Item = & ' a str > { let name_value : HashMap < String , u16 > = trace_points . into_iter ( ) . map ( | s | s . to_string ( ) ) . zip ( 1 .. ) // assign values to each trace point . collect ( ) ; let value_name = name_value . iter ( ) . map ( | ( n , v ) | ( * v , n . clone ( ) ) ) . collect ( ) ; Spec { name_value , value_name , } }
Create a new specification definition.
Create a new specification definition .
trace_points
T
trace_points
T