[−][src]Trait hyper::net::NetworkStream
An abstraction over streams that a Server
can utilize.
Required Methods
fn peer_addr(&mut self) -> Result<SocketAddr>
Get the remote address of the underlying connection.
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
Set the maximum time to wait for a read to complete.
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
Set the maximum time to wait for a write to complete.
Provided Methods
fn close(&mut self, _how: Shutdown) -> Result<()>
This will be called when Stream should no longer be kept alive.
Methods
impl dyn NetworkStream
[src]
impl dyn NetworkStream
pub fn is<T: Any>(&self) -> bool
[src]
pub fn is<T: Any>(&self) -> bool
Is the underlying type in this trait object a T
?
pub fn downcast_ref<T: Any>(&self) -> Option<&T>
[src]
pub fn downcast_ref<T: Any>(&self) -> Option<&T>
If the underlying type is T
, get a reference to the contained data.
pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>
[src]
pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>
If the underlying type is T
, get a mutable reference to the contained
data.
pub fn downcast<T: Any>(
self: Box<dyn NetworkStream>
) -> Result<Box<T>, Box<dyn NetworkStream>>
[src]
pub fn downcast<T: Any>(
self: Box<dyn NetworkStream>
) -> Result<Box<T>, Box<dyn NetworkStream>>
If the underlying type is T
, extract it.
impl dyn NetworkStream + Send
[src]
impl dyn NetworkStream + Send
pub fn is<T: Any>(&self) -> bool
[src]
pub fn is<T: Any>(&self) -> bool
Is the underlying type in this trait object a T
?
pub fn downcast_ref<T: Any>(&self) -> Option<&T>
[src]
pub fn downcast_ref<T: Any>(&self) -> Option<&T>
If the underlying type is T
, get a reference to the contained data.
pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>
[src]
pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>
If the underlying type is T
, get a mutable reference to the contained
data.
pub fn downcast<T: Any>(
self: Box<dyn NetworkStream + Send>
) -> Result<Box<T>, Box<dyn NetworkStream + Send>>
[src]
pub fn downcast<T: Any>(
self: Box<dyn NetworkStream + Send>
) -> Result<Box<T>, Box<dyn NetworkStream + Send>>
If the underlying type is T
, extract it.
Implementors
impl NetworkStream for HttpStream
[src]
impl NetworkStream for HttpStream
fn peer_addr(&mut self) -> Result<SocketAddr>
[src]
fn peer_addr(&mut self) -> Result<SocketAddr>
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
fn close(&mut self, how: Shutdown) -> Result<()>
[src]
fn close(&mut self, how: Shutdown) -> Result<()>
impl<S: NetworkStream> NetworkStream for HttpsStream<S>
[src]
impl<S: NetworkStream> NetworkStream for HttpsStream<S>
fn peer_addr(&mut self) -> Result<SocketAddr>
[src]
fn peer_addr(&mut self) -> Result<SocketAddr>
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
fn close(&mut self, how: Shutdown) -> Result<()>
[src]
fn close(&mut self, how: Shutdown) -> Result<()>
impl<S: NetworkStream> NetworkStream for PooledStream<S>
[src]
impl<S: NetworkStream> NetworkStream for PooledStream<S>
fn peer_addr(&mut self) -> Result<SocketAddr>
[src]
fn peer_addr(&mut self) -> Result<SocketAddr>
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
fn close(&mut self, how: Shutdown) -> Result<()>
[src]
fn close(&mut self, how: Shutdown) -> Result<()>
fn set_previous_response_expected_no_content(&mut self, expected: bool)
[src]
fn set_previous_response_expected_no_content(&mut self, expected: bool)
fn previous_response_expected_no_content(&self) -> bool
[src]
fn previous_response_expected_no_content(&self) -> bool