diff options
Diffstat (limited to 'msg_socket/src/msg_on_socket.rs')
-rw-r--r-- | msg_socket/src/msg_on_socket.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/msg_socket/src/msg_on_socket.rs b/msg_socket/src/msg_on_socket.rs index 2924dc6..d4eb18c 100644 --- a/msg_socket/src/msg_on_socket.rs +++ b/msg_socket/src/msg_on_socket.rs @@ -92,10 +92,11 @@ pub trait MsgOnSocket: Sized { } /// Returns (self, fd read count). /// This function is safe only when: - /// 0. fds contains valid fds, received from socket, serialized by Self::write_to_buffer. - /// 1. For enum, fds contains correct fd layout of the particular variant. - /// 2. write_to_buffer is implemented correctly(put valid fds into the buffer, has no padding, - /// return correct count). + /// + /// 0. fds contains valid fds, received from socket, serialized by Self::write_to_buffer. + /// 1. For enum, fds contains correct fd layout of the particular variant. + /// 2. write_to_buffer is implemented correctly(put valid fds into the buffer, has no padding, + /// return correct count). unsafe fn read_from_buffer(buffer: &[u8], fds: &[RawFd]) -> MsgResult<(Self, usize)>; /// Serialize self to buffers. fn write_to_buffer(&self, buffer: &mut [u8], fds: &mut [RawFd]) -> MsgResult<usize>; |