Add comments about impls for File, TcpStream, ChildStdin, etc.
This commit is contained in:
parent
68964a7d68
commit
ab08639e59
4 changed files with 42 additions and 0 deletions
|
@ -587,6 +587,12 @@ impl File {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In addition to the `impl`s here, `File` also has `impl`s for
|
||||||
|
// `AsFd`/`From<OwnedFd>`/`Into<OwnedFd>` and
|
||||||
|
// `AsRawFd`/`IntoRawFd`/`FromRawFd`, on Unix and WASI, and
|
||||||
|
// `AsHandle`/`From<OwnedHandle>`/`Into<OwnedHandle>` and
|
||||||
|
// `AsRawHandle`/`IntoRawHandle`/`FromRawHandle` on Windows.
|
||||||
|
|
||||||
impl AsInner<fs_imp::File> for File {
|
impl AsInner<fs_imp::File> for File {
|
||||||
fn as_inner(&self) -> &fs_imp::File {
|
fn as_inner(&self) -> &fs_imp::File {
|
||||||
&self.inner
|
&self.inner
|
||||||
|
|
|
@ -546,6 +546,12 @@ impl TcpStream {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In addition to the `impl`s here, `TcpStream` also has `impl`s for
|
||||||
|
// `AsFd`/`From<OwnedFd>`/`Into<OwnedFd>` and
|
||||||
|
// `AsRawFd`/`IntoRawFd`/`FromRawFd`, on Unix and WASI, and
|
||||||
|
// `AsSocket`/`From<OwnedSocket>`/`Into<OwnedSocket>` and
|
||||||
|
// `AsRawSocket`/`IntoRawSocket`/`FromRawSocket` on Windows.
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl Read for TcpStream {
|
impl Read for TcpStream {
|
||||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||||
|
@ -908,6 +914,12 @@ impl TcpListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In addition to the `impl`s here, `TcpListener` also has `impl`s for
|
||||||
|
// `AsFd`/`From<OwnedFd>`/`Into<OwnedFd>` and
|
||||||
|
// `AsRawFd`/`IntoRawFd`/`FromRawFd`, on Unix and WASI, and
|
||||||
|
// `AsSocket`/`From<OwnedSocket>`/`Into<OwnedSocket>` and
|
||||||
|
// `AsRawSocket`/`IntoRawSocket`/`FromRawSocket` on Windows.
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<'a> Iterator for Incoming<'a> {
|
impl<'a> Iterator for Incoming<'a> {
|
||||||
type Item = io::Result<TcpStream>;
|
type Item = io::Result<TcpStream>;
|
||||||
|
|
|
@ -779,6 +779,12 @@ impl UdpSocket {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In addition to the `impl`s here, `UdpSocket` also has `impl`s for
|
||||||
|
// `AsFd`/`From<OwnedFd>`/`Into<OwnedFd>` and
|
||||||
|
// `AsRawFd`/`IntoRawFd`/`FromRawFd`, on Unix and WASI, and
|
||||||
|
// `AsSocket`/`From<OwnedSocket>`/`Into<OwnedSocket>` and
|
||||||
|
// `AsRawSocket`/`IntoRawSocket`/`FromRawSocket` on Windows.
|
||||||
|
|
||||||
impl AsInner<net_imp::UdpSocket> for UdpSocket {
|
impl AsInner<net_imp::UdpSocket> for UdpSocket {
|
||||||
fn as_inner(&self) -> &net_imp::UdpSocket {
|
fn as_inner(&self) -> &net_imp::UdpSocket {
|
||||||
&self.0
|
&self.0
|
||||||
|
|
|
@ -258,6 +258,12 @@ pub struct ChildStdin {
|
||||||
inner: AnonPipe,
|
inner: AnonPipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In addition to the `impl`s here, `ChildStdin` also has `impl`s for
|
||||||
|
// `AsFd`/`From<OwnedFd>`/`Into<OwnedFd>` and
|
||||||
|
// `AsRawFd`/`IntoRawFd`/`FromRawFd`, on Unix and WASI, and
|
||||||
|
// `AsHandle`/`From<OwnedHandle>`/`Into<OwnedHandle>` and
|
||||||
|
// `AsRawHandle`/`IntoRawHandle`/`FromRawHandle` on Windows.
|
||||||
|
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
impl Write for ChildStdin {
|
impl Write for ChildStdin {
|
||||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||||
|
@ -335,6 +341,12 @@ pub struct ChildStdout {
|
||||||
inner: AnonPipe,
|
inner: AnonPipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In addition to the `impl`s here, `ChildStdout` also has `impl`s for
|
||||||
|
// `AsFd`/`From<OwnedFd>`/`Into<OwnedFd>` and
|
||||||
|
// `AsRawFd`/`IntoRawFd`/`FromRawFd`, on Unix and WASI, and
|
||||||
|
// `AsHandle`/`From<OwnedHandle>`/`Into<OwnedHandle>` and
|
||||||
|
// `AsRawHandle`/`IntoRawHandle`/`FromRawHandle` on Windows.
|
||||||
|
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
impl Read for ChildStdout {
|
impl Read for ChildStdout {
|
||||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||||
|
@ -396,6 +408,12 @@ pub struct ChildStderr {
|
||||||
inner: AnonPipe,
|
inner: AnonPipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In addition to the `impl`s here, `ChildStderr` also has `impl`s for
|
||||||
|
// `AsFd`/`From<OwnedFd>`/`Into<OwnedFd>` and
|
||||||
|
// `AsRawFd`/`IntoRawFd`/`FromRawFd`, on Unix and WASI, and
|
||||||
|
// `AsHandle`/`From<OwnedHandle>`/`Into<OwnedHandle>` and
|
||||||
|
// `AsRawHandle`/`IntoRawHandle`/`FromRawHandle` on Windows.
|
||||||
|
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
impl Read for ChildStderr {
|
impl Read for ChildStderr {
|
||||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue