mirror of
https://github.com/openharmony/third_party_rust_hyper.git
synced 2026-07-21 01:05:26 -04:00
feat(server): add into_inner to AddrStream (#1762)
It consumes the `AddrStream` and returns the underlying TcpStream.
This commit is contained in:
committed by
Sean McArthur
parent
25c4358037
commit
89dceccc6e
@@ -219,6 +219,12 @@ mod addr_stream {
|
||||
pub fn remote_addr(&self) -> SocketAddr {
|
||||
self.remote_addr
|
||||
}
|
||||
|
||||
/// Consumes the AddrStream and returns the underlying IO object
|
||||
#[inline]
|
||||
pub fn into_inner(self) -> TcpStream {
|
||||
self.inner
|
||||
}
|
||||
}
|
||||
|
||||
impl Read for AddrStream {
|
||||
|
||||
Reference in New Issue
Block a user