Giter Club home page Giter Club logo

Comments (2)

jplatte avatar jplatte commented on August 15, 2024

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.

jbirnick avatar jbirnick commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.