Struct axum_sqlx_tx::Service
source · pub struct Service<DB: Database, S, E = Error> { /* private fields */ }
Expand description
A tower_service::Service
that enables the Tx
extractor.
See Layer
for more information.
Trait Implementations§
source§impl<DB: Database, S, E, ReqBody, ResBody> Service<Request<ReqBody>> for Service<DB, S, E>where
S: Service<Request<ReqBody>, Response = Response<ResBody>, Error = Infallible>,
S::Future: Send + 'static,
E: From<Error> + IntoResponse,
ResBody: Body<Data = Bytes> + Send + 'static,
ResBody::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
impl<DB: Database, S, E, ReqBody, ResBody> Service<Request<ReqBody>> for Service<DB, S, E>where
S: Service<Request<ReqBody>, Response = Response<ResBody>, Error = Infallible>,
S::Future: Send + 'static,
E: From<Error> + IntoResponse,
ResBody: Body<Data = Bytes> + Send + 'static,
ResBody::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
§type Response = Response<UnsyncBoxBody<<ResBody as Body>::Data, Error>>
type Response = Response<UnsyncBoxBody<<ResBody as Body>::Data, Error>>
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<Service<DB, S, E> as Service<Request<ReqBody>>>::Response, <Service<DB, S, E> as Service<Request<ReqBody>>>::Error>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<Service<DB, S, E> as Service<Request<ReqBody>>>::Response, <Service<DB, S, E> as Service<Request<ReqBody>>>::Error>> + Send + 'static, Global>>
The future response value.