We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
AsRef<Self>
TcpStream
UnixStream
1 parent 37ca2f0 commit d1e06f8Copy full SHA for d1e06f8
tokio/src/net/tcp/stream.rs
@@ -1462,6 +1462,12 @@ impl fmt::Debug for TcpStream {
1462
}
1463
1464
1465
+impl AsRef<Self> for TcpStream {
1466
+ fn as_ref(&self) -> &Self {
1467
+ self
1468
+ }
1469
+}
1470
+
1471
#[cfg(unix)]
1472
mod sys {
1473
use super::TcpStream;
tokio/src/net/unix/stream.rs
@@ -1076,6 +1076,12 @@ impl fmt::Debug for UnixStream {
1076
1077
1078
1079
+impl AsRef<Self> for UnixStream {
1080
1081
1082
1083
1084
1085
impl AsRawFd for UnixStream {
1086
fn as_raw_fd(&self) -> RawFd {
1087
self.io.as_raw_fd()
0 commit comments