Struct axum::extract::connect_info::ConnectInfo
source ·
[−]pub struct ConnectInfo<T>(pub T);
Expand description
Extractor for getting connection information produced by a Connected
.
Note this extractor requires you to use
Router::into_make_service_with_connect_info
to run your app
otherwise it will fail at runtime.
See Router::into_make_service_with_connect_info
for more details.
Tuple Fields
0: T
Trait Implementations
type Rejection = <Extension<Self> as FromRequest<B>>::Rejection
type Rejection = <Extension<Self> as FromRequest<B>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response. Read more
fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Perform the extraction.
Auto Trait Implementations
impl<T> RefUnwindSafe for ConnectInfo<T> where
T: RefUnwindSafe,
impl<T> Send for ConnectInfo<T> where
T: Send,
impl<T> Sync for ConnectInfo<T> where
T: Sync,
impl<T> Unpin for ConnectInfo<T> where
T: Unpin,
impl<T> UnwindSafe for ConnectInfo<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Create a new Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more