Trait rocket::http::hyper::net::NetworkStream [−][src]
pub trait NetworkStream: Read + Write + Any + Send + Typeable { fn peer_addr(&mut self) -> Result<SocketAddr, Error>; fn set_read_timeout(&self, dur: Option<Duration>) -> Result<(), Error>; fn set_write_timeout(&self, dur: Option<Duration>) -> Result<(), Error>; fn close(&mut self, _how: Shutdown) -> Result<(), Error> { ... } }
Expand description
An abstraction over streams that a Server
can utilize.
Required methods
fn peer_addr(&mut self) -> Result<SocketAddr, Error>
[src]
fn peer_addr(&mut self) -> Result<SocketAddr, Error>
[src]Get the remote address of the underlying connection.
Provided methods
Implementations
impl dyn NetworkStream + 'static
[src]
impl dyn NetworkStream + 'static
[src]pub fn downcast_ref<T>(&self) -> Option<&T> where
T: Any,
[src]
pub fn downcast_ref<T>(&self) -> Option<&T> where
T: Any,
[src]If the underlying type is T
, get a reference to the contained data.
pub fn downcast_mut<T>(&mut self) -> Option<&mut T> where
T: Any,
[src]
pub fn downcast_mut<T>(&mut self) -> Option<&mut T> where
T: Any,
[src]If the underlying type is T
, get a mutable reference to the contained
data.
impl dyn NetworkStream + 'static + Send
[src]
impl dyn NetworkStream + 'static + Send
[src]pub fn downcast_ref<T>(&self) -> Option<&T> where
T: Any,
[src]
pub fn downcast_ref<T>(&self) -> Option<&T> where
T: Any,
[src]If the underlying type is T
, get a reference to the contained data.
pub fn downcast_mut<T>(&mut self) -> Option<&mut T> where
T: Any,
[src]
pub fn downcast_mut<T>(&mut self) -> Option<&mut T> where
T: Any,
[src]If the underlying type is T
, get a mutable reference to the contained
data.
Implementations on Foreign Types
impl<S> NetworkStream for PooledStream<S> where
S: NetworkStream,
[src]
impl<S> NetworkStream for PooledStream<S> where
S: NetworkStream,
[src]pub fn peer_addr(&mut self) -> Result<SocketAddr, Error>
[src]
pub fn set_read_timeout(&self, dur: Option<Duration>) -> Result<(), Error>
[src]
pub fn set_write_timeout(&self, dur: Option<Duration>) -> Result<(), Error>
[src]
pub fn close(&mut self, how: Shutdown) -> Result<(), Error>
[src]
pub fn set_previous_response_expected_no_content(&mut self, expected: bool)
[src]
pub fn previous_response_expected_no_content(&self) -> bool
[src]
impl<S, U> NetworkStream for WrappedStream<S, U> where
S: 'static + Session,
U: NetworkStream,
impl<S, U> NetworkStream for WrappedStream<S, U> where
S: 'static + Session,
U: NetworkStream,
Implementors
impl NetworkStream for HttpStream
[src]
impl NetworkStream for HttpStream
[src]impl<S> NetworkStream for HttpsStream<S> where
S: NetworkStream,
[src]
impl<S> NetworkStream for HttpsStream<S> where
S: NetworkStream,
[src]