You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another issue seems to be about the way I am using fallback_service. It says that it expected an argument but saw 0, which is odd because I clearly gave it an argument. What's going on here?
I'm starting to doubt if fallback_service is the right choice. I want to have routing like this:
/api for REST API
/ for static file serving, where an api directory should not interfere with /api
fallback_service sounded like the thing that came closest to what I want to achieve but now I'm not so sure. Any ideas about what I can use? Or how I can fix the error?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I'm working on a project at https://git.sr.ht/~latex/streamlist
I have 3 confusing compilation errors:
It seems that in the documentation, there is some conflicting info. I designed this around the example in https://docs.rs/axum/latest/axum/middleware/index.html#towerservice-and-pinboxdyn-future but I also need to access the state, which an example is shown for in https://docs.rs/axum/latest/axum/middleware/index.html#accessing-state-in-custom-towerlayers which doesn't seem to have Box::pin or anything like that so that is very confusing. What am I supposed to do here? I want to return a response and not some request.
Another issue seems to be about the way I am using fallback_service. It says that it expected an argument but saw 0, which is odd because I clearly gave it an argument. What's going on here?
I'm starting to doubt if fallback_service is the right choice. I want to have routing like this:
/api
for REST API/
for static file serving, where anapi
directory should not interfere with/api
fallback_service sounded like the thing that came closest to what I want to achieve but now I'm not so sure. Any ideas about what I can use? Or how I can fix the error?
Thanks in advance.
axum version
0.7.7
Beta Was this translation helpful? Give feedback.
All reactions