pub fn send_events(&mut self, events: &[Event]) {
        if let Some(ref mut child_process) = self.monitor_process {
            if let Some(ref mut p_stdin) = child_process.stdin.as_mut() {
                let json = serde_json::to_string(&events);

                match json {
                    Ok(data) => {
                        // FIXME: tighten up this error message
                        write!(p_stdin, "{}", data).expect("Writing data to plugin failed!");
                    }
                    Err(error) => {
                        // FIXME: tighten up this error message
                        error!("There was a problem serializing the JSON data: {:?}", error);
                    }
                };
            }
        }
    }
/// send event to the monitor process
// if hook command is not configured, this is a no-op
send event to the monitor process
if hook command is not configured, this is a no-op
send event to the monitor process if hook command is not configured this is a no - op
pub fn send_events(&mut self, events: &[Event]) {
        if let Some(ref mut child_process) = self.monitor_process {
            if let Some(ref mut p_stdin) = child_process.stdin.as_mut() {
                let json = serde_json::to_string(&events);
                match json {
                    Ok(data) => {
                        // FIXME: tighten up this error message
                        write!(p_stdin, "{}", data).expect("Writing data to plugin failed!");
                    }
                    Err(error) => {
                        // FIXME: tighten up this error message
                        error!("There was a problem serializing the JSON data: {:?}", error);
                    }
                };
            }
        }
    }
pub fn send_events ( & mut self , events : & [ Event ] ) { if let Some ( ref mut child_process ) = self . monitor_process { if let Some ( ref mut p_stdin ) = child_process . stdin . as_mut ( ) { let json = serde_json :: to_string ( & events ) ; match json { Ok ( data ) => { // FIXME: tighten up this error message write ! ( p_stdin " " data ) . expect ( " " ) ; } Err ( error ) => { // FIXME: tighten up this error message error ! ( " " error ) ; } } ; } } }
send event to the monitor process
if hook command is not configured, this is a no-op
send event to the monitor process if hook command is not configured this is a no - op
&mut self
events
&[Event]
&mut self
events
&[Event]