pub fn write(&self, out_path: &Path) -> std::io::Result<()> {
        let points: Vec<JsonValue> = self.name_value.iter()
            .map(|(name, value)| json::object! { name: name.clone(), value: *value })
            .collect();
        let obj = json::object! {
            "_version": SPEC_VERSION,
            "trace-points": points,
        };

        let mut file = File::create(out_path)?;
        obj.write(&mut file)?;

        use std::io::Write;
        file.flush()
    }
/// Saves the trace specification to file.
Saves the trace specification to file.
Saves the trace specification to file .
pub fn write(&self, out_path: &Path) -> std::io::Result<()> {
        let points: Vec<JsonValue> = self.name_value.iter()
            .map(|(name, value)| json::object! { name: name.clone(), value: *value })
            .collect();
        let obj = json::object! {
            "_version": SPEC_VERSION,
            "trace-points": points,
        };
        let mut file = File::create(out_path)?;
        obj.write(&mut file)?;
        use std::io::Write;
        file.flush()
    }
pub fn write ( & self , out_path : & Path ) -> std :: io :: Result < ( ) > { let points : Vec < JsonValue > = self . name_value . iter ( ) . map ( | ( name , value ) | json :: object ! { name name clone ( ) value value } ) . collect ( ) ; let obj = json :: object ! { " " SPEC_VERSION " " points } ; let mut file = File :: create ( out_path ) ? ; obj . write ( & mut file ) ? ; use std :: io :: Write ; file . flush ( ) }
Saves the trace specification to file.
Saves the trace specification to file .
&self
out_path
&Path
&self
out_path
&Path