Skip to content

Attributes on inferred type #4113

@Lege19

Description

@Lege19

I have found these related issues/pull requests

Would be enabled by #4114

Description

At the moment the types inferred by query! and similar derive Debug and nothing else.
I'm writing a server with Axum and I often need a query type to implement serde::Deserialize so that it can be sent as JSON to the client.
Currently this requires using query_as! and writing out all the fields twice.

Prefered solution

Allow users to specify extra attributes to be applied to the inferred type.

I've suggested a specific syntax for this as part of #4114.

Is this a breaking change? Why or why not?

This is not a breaking change because the existing macros are not effected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions