From a537eb3e1b7372c791b91f1083e7ba549fa4dc95 Mon Sep 17 00:00:00 2001 From: Philipp Dresselmann Date: Mon, 16 Dec 2024 22:28:07 +0100 Subject: [PATCH] chore(docs): Adjust docstrings for the mio module --- util/src/mio/mio.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/src/mio/mio.rs b/util/src/mio/mio.rs index d8bdc70..97c724b 100644 --- a/util/src/mio/mio.rs +++ b/util/src/mio/mio.rs @@ -20,7 +20,7 @@ pub mod interest { pub const RW: Interest = R.add(W); } -/// Extension trait providing additional functionality for Unix listener +/// Extension trait providing additional functionality for a Unix listener /// /// # Example /// @@ -61,6 +61,7 @@ pub mod interest { /// ``` pub trait UnixListenerExt: Sized { /// Creates a new Unix listener by claiming ownership of a raw file descriptor + /// (see [fd::claim_fd](crate::fd::claim_fd)) fn claim_fd(fd: RawFd) -> anyhow::Result; } @@ -74,15 +75,17 @@ impl UnixListenerExt for UnixListener { } } -/// Extension trait providing additional functionality for Unix streams +/// Extension trait providing additional functionality for a Unix stream pub trait UnixStreamExt: Sized { /// Creates a new Unix stream from an owned file descriptor fn from_fd(fd: OwnedFd) -> anyhow::Result; /// Claims ownership of a raw file descriptor and creates a new Unix stream + /// (see [fd::claim_fd](crate::fd::claim_fd)) fn claim_fd(fd: RawFd) -> anyhow::Result; /// Claims ownership of a raw file descriptor in place and creates a new Unix stream + /// (see [fd::claim_fd_inplace](crate::fd::claim_fd_inplace)) fn claim_fd_inplace(fd: RawFd) -> anyhow::Result; }