Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc aliases for seek, tell, and chownat. #481

Merged
merged 3 commits into from Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/fs/at.rs
Expand Up @@ -374,6 +374,7 @@ pub fn mknodat<P: path::Arg, Fd: AsFd>(
/// [Linux]: https://man7.org/linux/man-pages/man2/fchownat.2.html
#[cfg(not(target_os = "wasi"))]
#[inline]
#[doc(alias = "fchownat")]
pub fn chownat<P: path::Arg, Fd: AsFd>(
dirfd: Fd,
path: P,
Expand Down
2 changes: 2 additions & 0 deletions src/fs/fd.rs
Expand Up @@ -87,6 +87,7 @@ pub const NFS_SUPER_MAGIC: FsWord = backend::fs::types::NFS_SUPER_MAGIC;
/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html
/// [Linux]: https://man7.org/linux/man-pages/man2/lseek.2.html
#[inline]
#[doc(alias = "lseek")]
pub fn seek<Fd: AsFd>(fd: Fd, pos: SeekFrom) -> io::Result<u64> {
backend::fs::syscalls::seek(fd.as_fd(), pos)
}
Expand All @@ -104,6 +105,7 @@ pub fn seek<Fd: AsFd>(fd: Fd, pos: SeekFrom) -> io::Result<u64> {
/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html
/// [Linux]: https://man7.org/linux/man-pages/man2/lseek.2.html
#[inline]
#[doc(alias = "lseek")]
pub fn tell<Fd: AsFd>(fd: Fd) -> io::Result<u64> {
backend::fs::syscalls::tell(fd.as_fd())
}
Expand Down
2 changes: 2 additions & 0 deletions src/io/context.rs
Expand Up @@ -45,6 +45,8 @@ impl<'a, T: fmt::Debug> fmt::Debug for Ref<'a, T> {
}

/// A trait for data stored within an [`Epoll`] instance.
///
/// [`Epoll`]: crate::io::epoll::Epoll
pub trait Context {
/// The type of an element owned by this context.
type Data;
Expand Down
2 changes: 2 additions & 0 deletions src/net/socket.rs
Expand Up @@ -22,6 +22,8 @@ impl Default for Protocol {
/// however it is not safe in general to rely on this, as file descriptors
/// may be unexpectedly allocated on other threads or in libraries.
///
/// To pass extra flags such as [`SocketFlags::CLOEXEC`], use [`socket_with`].
///
/// # References
/// - [POSIX]
/// - [Linux]
Expand Down