pub struct IncomingStream<'a> { /* private fields */ }Expand description
An incoming stream.
Used with serve and IntoMakeServiceWithConnectInfo.
Implementations§
Source§impl IncomingStream<'_>
impl IncomingStream<'_>
Sourcepub fn local_addr(&self) -> Result<SocketAddr, Error>
pub fn local_addr(&self) -> Result<SocketAddr, Error>
Returns the local address that this stream is bound to.
Sourcepub fn remote_addr(&self) -> SocketAddr
pub fn remote_addr(&self) -> SocketAddr
Returns the remote address that this stream is bound to.
Trait Implementations§
Source§impl Connected<IncomingStream<'_>> for SocketAddr
impl Connected<IncomingStream<'_>> for SocketAddr
Source§fn connect_info(target: IncomingStream<'_>) -> SocketAddr
fn connect_info(target: IncomingStream<'_>) -> SocketAddr
Create type holding information about the connection.
Source§impl<'a> Debug for IncomingStream<'a>
impl<'a> Debug for IncomingStream<'a>
Source§impl<H, T, S> Service<IncomingStream<'_>> for HandlerService<H, T, S>
impl<H, T, S> Service<IncomingStream<'_>> for HandlerService<H, T, S>
Source§type Response = HandlerService<H, T, S>
type Response = HandlerService<H, T, S>
Responses given by the service.
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Response, <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Error>>
type Future = Ready<Result<<HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Response, <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Error>>
The future response value.
Source§fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Error>>
fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll<Result<(), <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Error>>
Returns
Poll::Ready(Ok(())) when the service is able to process requests. Read moreSource§fn call(
&mut self,
_req: IncomingStream<'_>,
) -> <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Future
fn call( &mut self, _req: IncomingStream<'_>, ) -> <HandlerService<H, T, S> as Service<IncomingStream<'_>>>::Future
Process the request and return the response asynchronously. Read more
Source§impl Service<IncomingStream<'_>> for MethodRouter
impl Service<IncomingStream<'_>> for MethodRouter
Source§type Response = MethodRouter
type Response = MethodRouter
Responses given by the service.
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<MethodRouter as Service<IncomingStream<'_>>>::Response, <MethodRouter as Service<IncomingStream<'_>>>::Error>>
type Future = Ready<Result<<MethodRouter as Service<IncomingStream<'_>>>::Response, <MethodRouter as Service<IncomingStream<'_>>>::Error>>
The future response value.
Source§fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), <MethodRouter as Service<IncomingStream<'_>>>::Error>>
fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll<Result<(), <MethodRouter as Service<IncomingStream<'_>>>::Error>>
Returns
Poll::Ready(Ok(())) when the service is able to process requests. Read moreSource§fn call(
&mut self,
_req: IncomingStream<'_>,
) -> <MethodRouter as Service<IncomingStream<'_>>>::Future
fn call( &mut self, _req: IncomingStream<'_>, ) -> <MethodRouter as Service<IncomingStream<'_>>>::Future
Process the request and return the response asynchronously. Read more
Source§impl Service<IncomingStream<'_>> for Router
impl Service<IncomingStream<'_>> for Router
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Ready<Result<<Router as Service<IncomingStream<'_>>>::Response, <Router as Service<IncomingStream<'_>>>::Error>>
type Future = Ready<Result<<Router as Service<IncomingStream<'_>>>::Response, <Router as Service<IncomingStream<'_>>>::Error>>
The future response value.
Source§fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), <Router as Service<IncomingStream<'_>>>::Error>>
fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll<Result<(), <Router as Service<IncomingStream<'_>>>::Error>>
Returns
Poll::Ready(Ok(())) when the service is able to process requests. Read moreSource§fn call(
&mut self,
_req: IncomingStream<'_>,
) -> <Router as Service<IncomingStream<'_>>>::Future
fn call( &mut self, _req: IncomingStream<'_>, ) -> <Router as Service<IncomingStream<'_>>>::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<'a> Freeze for IncomingStream<'a>
impl<'a> RefUnwindSafe for IncomingStream<'a>
impl<'a> Send for IncomingStream<'a>
impl<'a> Sync for IncomingStream<'a>
impl<'a> Unpin for IncomingStream<'a>
impl<'a> UnwindSafe for IncomingStream<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more