-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
#[any]
macro
#3310
base: master
Are you sure you want to change the base?
#[any]
macro
#3310
Conversation
@@ -196,6 +196,7 @@ method_macro!(Connect, connect); | |||
method_macro!(Options, options); | |||
method_macro!(Trace, trace); | |||
method_macro!(Patch, patch); | |||
method_macro!(All, all); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will almost certainly be easier with a new macro creator rather than trying to retro-fit method_macro!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is making a custom http server and defining any a way or is there a better way? @robjtede
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What it would need to generate would be similar to the other macros (an HttpServiceFactory implementation) except without adding any method guards to the route.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry but I am not sure if I understand @robjtede
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[route("/single", method = "ALL")] | ||
async fn index() -> String { | ||
"Hello Single!".to_owned() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we were trying to aim more so for the dedicated macro style:
#[any("/path")]
async handler() {
// ...
PR Type
It's a draft PR for progress checking DRAFT PRPR_TYPE
PR Checklist
Overview