pub fn recv<B>(&self, mut buf: B, flags: i32) -> Result<libc::size_t, io::Error>
    where
        B: AsMut<[u8]>,
    {
        match unsafe {
            libc::recv(
                self.fd,
                buf.as_mut() as *mut _ as *mut c_void,
                buf.as_mut().len(),
                flags,
            )
        } {
            i if i >= 0 => Ok(i as libc::size_t),
            _ => Err(io::Error::last_os_error()),
        }
    }
/// Receive message encoded as byte slice from the netlink socket.
Receive message encoded as byte slice from the netlink socket.
Receive message encoded as byte slice from the netlink socket .
pub fn recv<B>(&self, mut buf: B, flags: i32) -> Result<libc::size_t, io::Error>
    where
        B: AsMut<[u8]>,
    {
        match unsafe {
            libc::recv(
                self.fd,
                buf.as_mut() as *mut _ as *mut c_void,
                buf.as_mut().len(),
                flags,
            )
        } {
            i if i >= 0 => Ok(i as libc::size_t),
            _ => Err(io::Error::last_os_error()),
        }
    }
pub fn recv < B > ( & self , mut buf : B , flags : i32 ) -> Result < libc :: size_t , io :: Error > where B : AsMut < [ u8 ] > , { match unsafe { libc :: recv ( self . fd , buf . as_mut ( ) as * mut _ as * mut c_void , buf . as_mut ( ) . len ( ) , flags , ) } { i if i >= 0 => Ok ( i as libc :: size_t ) , _ => Err ( io :: Error :: last_os_error ( ) ) , } }
Receive message encoded as byte slice from the netlink socket.
Receive message encoded as byte slice from the netlink socket .
&self
buf
B
flags
i32
&self
buf
B
flags
i32