Skip to content

Commit b45d842

Browse files
bors[bot]asomers
andauthored
Merge #1524
1524: Add docs for most sockopts r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2 parents 1b7e485 + af29f2e commit b45d842

File tree

2 files changed

+287
-94
lines changed

2 files changed

+287
-94
lines changed

src/sys/socket/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use crate::sys::time::TimeVal;
1414
use crate::sys::uio::IoVec;
1515

1616
mod addr;
17+
#[deny(missing_docs)]
1718
pub mod sockopt;
1819

1920
/*
@@ -1714,21 +1715,19 @@ pub fn send(fd: RawFd, buf: &[u8], flags: MsgFlags) -> Result<usize> {
17141715
*
17151716
*/
17161717

1717-
/// Represents a socket option that can be accessed or set. Used as an argument
1718-
/// to `getsockopt`
1718+
/// Represents a socket option that can be retrieved.
17191719
pub trait GetSockOpt : Copy {
17201720
type Val;
17211721

1722-
#[doc(hidden)]
1722+
/// Look up the value of this socket option on the given socket.
17231723
fn get(&self, fd: RawFd) -> Result<Self::Val>;
17241724
}
17251725

1726-
/// Represents a socket option that can be accessed or set. Used as an argument
1727-
/// to `setsockopt`
1726+
/// Represents a socket option that can be set.
17281727
pub trait SetSockOpt : Clone {
17291728
type Val;
17301729

1731-
#[doc(hidden)]
1730+
/// Set the value of this socket option on the given socket.
17321731
fn set(&self, fd: RawFd, val: &Self::Val) -> Result<()>;
17331732
}
17341733

0 commit comments

Comments
 (0)