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