Skip to content

Provide an extension point for checking the return type in Fn concepts #346

Open
@danakj

Description

@danakj

Right now we have Anything and NonVoid as in sus::fn::FnMut<Anything()> but it's very common to constrain on other return types like "returns an Option". So we should be able to write a type IsOption that the FnMut concept can test against without saying it is that type, but that it accepts that type.

Then replace a ton of invoke_result_t && IsOption::value constraints and others like it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign of the library systems as a whole, such as concepts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions