Struct salvo_core::conn::Accepted
source · #[non_exhaustive]pub struct Accepted<C>where
C: HttpConnection,{
pub conn: C,
pub local_addr: SocketAddr,
pub remote_addr: SocketAddr,
pub http_scheme: Scheme,
pub http_version: Version,
}
Expand description
Acceptor
’s return type.
The Accepted
struct represents an accepted connection and contains information such as the connection itself,
the local and remote addresses, the HTTP scheme, and the HTTP version.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.conn: C
Incoming stream.
local_addr: SocketAddr
Local addr.
remote_addr: SocketAddr
Remote addr.
http_scheme: Scheme
Http scheme.
http_version: Version
Http version.
Implementations§
Auto Trait Implementations§
impl<C> Freeze for Accepted<C>where
C: Freeze,
impl<C> RefUnwindSafe for Accepted<C>where
C: RefUnwindSafe,
impl<C> Send for Accepted<C>where
C: Send,
impl<C> Sync for Accepted<C>where
C: Sync,
impl<C> Unpin for Accepted<C>where
C: Unpin,
impl<C> UnwindSafe for Accepted<C>where
C: UnwindSafe,
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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