pub fn send<T, P>(&mut self, msg: Nlmsghdr<T, P>) -> Result<(), NlError>
    where
        T: Nl + NlType + Debug,
        P: Nl + Debug,
    {
        #[cfg(feature = "logging")]
        log!("Message sent:\n{:#?}", msg);

        if msg.nl_flags.contains(&NlmF::Ack) {
            self.needs_ack = true;
        }

        let mut buffer = vec![0; msg.asize()];
        msg.serialize(buffer.as_mut_slice()).map_err(NlError::new)?;
        self.socket.send(buffer, 0)?;

        Ok(())
    }
/// Convenience function to send an [`Nlmsghdr`] struct
Convenience function to send an [`Nlmsghdr`] struct
Convenience function to send an [ ` Nlmsghdr ` ] struct
pub fn send<T, P>(&mut self, msg: Nlmsghdr<T, P>) -> Result<(), NlError>
    where
        T: Nl + NlType + Debug,
        P: Nl + Debug,
    {
        #[cfg(feature = "logging")]
        log!("Message sent:\n{:#?}", msg);
        if msg.nl_flags.contains(&NlmF::Ack) {
            self.needs_ack = true;
        }
        let mut buffer = vec![0; msg.asize()];
        msg.serialize(buffer.as_mut_slice()).map_err(NlError::new)?;
        self.socket.send(buffer, 0)?;
        Ok(())
    }
pub fn send < T , P > ( & mut self , msg : Nlmsghdr < T , P > ) -> Result < ( ) , NlError > where T : Nl + NlType + Debug , P : Nl + Debug , { # [ cfg ( feature " " ) ] log ! ( " \n " msg ) ; if msg . nl_flags . contains ( & NlmF :: Ack ) { self . needs_ack = true ; } let mut buffer = vec ! [ 0 msg asize ( ) ] ; msg . serialize ( buffer . as_mut_slice ( ) ) . map_err ( NlError :: new ) ? ; self . socket . send ( buffer , 0 ) ? ; Ok ( ( ) ) }
Convenience function to send an [`Nlmsghdr`] struct
Convenience function to send an [ ` Nlmsghdr ` ] struct
&mut self
msg
Nlmsghdr<T, P>
&mut self
msg
Nlmsghdr<T, P>