Skip to content

[suggestion] Handler trait #2092

@petar-dambovaliev

Description

@petar-dambovaliev

There doesn't seem to be a handler trait that clearly establishes an interface between the application and the user handler functions.
At our company, we created a tracing_rocket crate which allows for open telemetry spans (by implementing additional features in the macros) from the code calling the user defined handler.
We use that, instead of the rocket macros that generate handlers.

When you combine that (not having a contract) with the fact that part of the application routing is happening inside the generated handler (forwarding), it leaves a lot of room for our crate breaking on a "non breaking change" in rocket.

Metadata

Metadata

Assignees

No one assigned

    Labels

    suggestionA suggestion to change functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions