Comments (2)
Hey. This seems like a pretty niche and simultaneously opinionated feature to me, so I don't think think it makes sense for us to accept it into axum and maintain it.
However, this also doesn't have to be in axum. You can make a separate crate for this, and to make it easy to discover, make a PR adding a link to the repo or crates.io page to our ECOSYSTEM.md
file.
If you're looking for resources on how to write your own proc-macro, I wrote a few blog posts about it on https://blog.turbo.fish (though I haven't updated them to syn 2 yet, which changes attribute parsing and a few smaller things). You could also have a look at how the derives in axum-macros
work.
from axum.
I'm fine with moving it to another crate, but why is it opinionated? I mean every SSE event has a name and some data, so it's really natural to represent it in rust with an enum. (And then it would be natural to have an easy conversion method to Event
.)
If you think there is a less opinionated way to make working with events easy, please tell me. That's why I asked for feedback in my post. I want to make a non-opinionated interface which all people like, and I'm happy to draw from the learnings of people with more Rust experience than me.
In particular, is it perhaps possible to move this thread to "Discussions", so I can get feedback from other people?
from axum.
Related Issues (20)
- 0.7.5 can't get headerMap and body in one handler?
- Remove `heck` from axum-macros HOT 2
- Cors error to return bytes of file
- Unexpected behaviour in example `static-file-server`
- there is no timer running, must be called from the context of Tokio runtime HOT 1
- Report error: "implementation of `std::marker::Send` is not general enough" in route handler HOT 1
- stream-to-file can not upload big file HOT 1
- `FromRef` triggers `clippy::clone_of_ref_ptr` HOT 1
- Content-Type for Json does not support those of aws HOT 1
- axum fails tests without default features, due to incompletely declared feature "json" HOT 5
- Conversion from BodyDataStream to AsyncRead is not working HOT 3
- `RequestBodyLimit` docs link out of date HOT 1
- feat: expose inner `WebSocketStream`
- Weird behavior when returning response without consuming multipart body [REPRO] HOT 2
- Handler<_, _>` is not satisfied the following other types implement trait `Handler<T, S>`: HOT 7
- Example for low-level-native-tls HOT 5
- How can I set `max_concurrent_streams` HOT 1
- 0.7.5. server not reachable
- Drop IntoResponse trait requirement from FromRequestParts and FromRequest Rejections HOT 1
- Duplicate dependency `sync_wrapper` with latest version of `axum` and `axum-core`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axum.