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
Provide support for boxed custom matchers in layer enums #92
Comments
Hi @GlenDC, could you please provide some guidance for the type of the inner field of the new enum variant? Should we use the pub enum HttpMatcherKind
//...
Predicate(Arc<dyn crate::service::Matcher<State, Request<Body>>>)
} Or the Is it correct that this change will require introducing generics for |
I would do it like this: pub enum HttpMatcherKind<State, Body> {
//...
Custom(Box<dyn crate::service::Matcher<State, Request<Body>>>)
} So a It does indeed also mean that you'll need to introduce generic parameters, not much that can be done about that. Other then that you're good to go. Thanks again. |
I've attempted to add the |
Awesome work @dmackdev . Seeing the progress makes me happy. I left comments and a review behind on your pull request. I hope this serves as sufficient guidance. But if something is still not clear, or you want to spar some ideas or other feedback, do let me know. All good. |
@GlenDC I can pick this up for the transport layer too. |
Great! All yours and thank you for that! |
For both stream (L4) and http layers we have enums to allow for single type groupings. As an escape hatch might be good to allow custom boxed variants as well.
The text was updated successfully, but these errors were encountered: