Skip to content

Accept a trait in the return of a #[command] #1672

@chippers

Description

@chippers

Is your feature request related to a problem? Please describe.
Accept a trait in the return of a #[command] function. Default implementations will include () and Result.

Describe the solution you'd like
We should implement this at the same time as #1665 and #1622 to change all aspects of #[command] codegen in a single release. It's likely I will implement this functionality this weekend.

Describe alternatives you've considered
/* ... */

Additional context
All 3 PRs will have the end result of a small change of with_window not doing anything as all things needed for knowing how to handle window will be moved to a trait. It's not a breaking change, but we will not be reading it and it should be removed from all examples and documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions