Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to actix-service 2.0 #45

Closed
dsietz opened this issue Nov 24, 2021 · 2 comments
Closed

Upgrade to actix-service 2.0 #45

dsietz opened this issue Nov 24, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dsietz
Copy link
Owner

dsietz commented Nov 24, 2021

Currently using version ^1

@dsietz
Copy link
Owner Author

dsietz commented Nov 24, 2021

actix-web is currently using actix-service ^1.0.0 and therefore the middleware doesn't support the new Transform.

error[E0437]: type `Request` is not a member of trait `Transform`
   --> src\dtc\middleware\actix.rs:107:5
    |
107 |     type Request = ServiceRequest;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Transform`

error[E0437]: type `Request` is not a member of trait `Service`
   --> src\dtc\middleware\actix.rs:128:5
    |
128 |     type Request = ServiceRequest;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Service`

error[E0437]: type `Request` is not a member of trait `Transform`
   --> src\dua\middleware\actix.rs:109:5
    |
109 |     type Request = ServiceRequest;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Transform`

error[E0437]: type `Request` is not a member of trait `Service`
   --> src\dua\middleware\actix.rs:135:5
    |
135 |     type Request = ServiceRequest;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Service`

error[E0107]: this trait takes 2 generic arguments but 1 generic argument was supplied
   --> src\dtc\middleware\actix.rs:101:12
    |
101 | impl<S, B> Transform<S> for DTCEnforcer
    |            ^^^^^^^^^ - supplied 1 generic argument
    |            |
    |            expected 2 generic arguments
    |
note: trait defined here, with 2 generic parameters: `S`, `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src\transform.rs:83:11
    |
83  | pub trait Transform<S, Req> {
    |           ^^^^^^^^^ -  ---
help: add missing generic argument
    |
101 | impl<S, B> Transform<S, Req> for DTCEnforcer
    |                       +++++

error[E0107]: missing generics for trait `dtc::extractor::actix_service::Service`
   --> src\dtc\middleware\actix.rs:122:12
    |
122 | impl<S, B> Service for DTCEnforcerMiddleware<S>
    |            ^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src/lib.rs:93:11
    |
93  | pub trait Service<Req> {
    |           ^^^^^^^ ---
help: add missing generic argument
    |
122 | impl<S, B> Service<Req> for DTCEnforcerMiddleware<S>
    |            ~~~~~~~~~~~~

error[E0107]: this trait takes 2 generic arguments but 1 generic argument was supplied
   --> src\dua\middleware\actix.rs:103:12
    |
103 | impl<S, B> Transform<S> for DUAEnforcer
    |            ^^^^^^^^^ - supplied 1 generic argument
    |            |
    |            expected 2 generic arguments
    |
note: trait defined here, with 2 generic parameters: `S`, `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src\transform.rs:83:11
    |
83  | pub trait Transform<S, Req> {
    |           ^^^^^^^^^ -  ---
help: add missing generic argument
    |
103 | impl<S, B> Transform<S, Req> for DUAEnforcer
    |                       +++++

error[E0107]: missing generics for trait `dtc::extractor::actix_service::Service`
   --> src\dua\middleware\actix.rs:129:12
    |
129 | impl<S, B> Service for DUAEnforcerMiddleware<S>
    |            ^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src/lib.rs:93:11
    |
93  | pub trait Service<Req> {
    |           ^^^^^^^ ---
help: add missing generic argument
    |
129 | impl<S, B> Service<Req> for DUAEnforcerMiddleware<S>
    |            ~~~~~~~~~~~~

error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> src\dtc\middleware\actix.rs:103:8
    |
103 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |        ^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src/lib.rs:93:11
    |
93  | pub trait Service<Req> {
    |           ^^^^^^^ ---
help: add missing generic argument
    |
103 |     S: Service<Req, Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ++++

error[E0220]: associated type `Request` not found for `dtc::extractor::actix_service::Service<[type error]>`
   --> src\dtc\middleware\actix.rs:103:16
    |
103 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ^^^^^^^ associated type `Request` not found

error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> src\dtc\middleware\actix.rs:124:8
    |
124 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |        ^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src/lib.rs:93:11
    |
93  | pub trait Service<Req> {
    |           ^^^^^^^ ---
help: add missing generic argument
    |
124 |     S: Service<Req, Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ++++

error[E0220]: associated type `Request` not found for `dtc::extractor::actix_service::Service<[type error]>`
   --> src\dtc\middleware\actix.rs:124:16
    |
124 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ^^^^^^^ associated type `Request` not found

error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> src\dua\middleware\actix.rs:105:8
    |
105 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |        ^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src/lib.rs:93:11
    |
93  | pub trait Service<Req> {
    |           ^^^^^^^ ---
help: add missing generic argument
    |
105 |     S: Service<Req, Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ++++

error[E0220]: associated type `Request` not found for `dtc::extractor::actix_service::Service<[type error]>`
   --> src\dua\middleware\actix.rs:105:16
    |
105 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ^^^^^^^ associated type `Request` not found

error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
   --> src\dua\middleware\actix.rs:131:8
    |
131 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |        ^^^^^^^ expected 1 generic argument
    |
note: trait defined here, with 1 generic parameter: `Req`
   --> C:\Users\dsietz\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.1\src/lib.rs:93:11
    |
93  | pub trait Service<Req> {
    |           ^^^^^^^ ---
help: add missing generic argument
    |
131 |     S: Service<Req, Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ++++

error[E0220]: associated type `Request` not found for `dtc::extractor::actix_service::Service<[type error]>`
   --> src\dua\middleware\actix.rs:131:16
    |
131 |     S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    |                ^^^^^^^ associated type `Request` not found

@dsietz dsietz added the enhancement New feature or request label Nov 24, 2021
@dsietz
Copy link
Owner Author

dsietz commented Aug 18, 2023

It has been decided to remove the extractor and middleware functionality form the DTC and DUA features, therefore making this issue NA.

dsietz added a commit that referenced this issue Aug 18, 2023
@dsietz dsietz self-assigned this Aug 18, 2023
@dsietz dsietz closed this as completed Aug 26, 2023
@dsietz dsietz mentioned this issue Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant