Skip to content

Allow access to the Either type #5

Open
@seanmonstar

Description

@seanmonstar

The Filter::or combinator returns an Either<A, B> type, but it currently isn't exported publicly, making it impossible to match on the variants. It does implement Reply, making the full framework function, but it's currently impossible to use or to retrieve either A or B.

Some reasons why it hasn't been exposed yet:

  • It may be beneficial to change from Either<A, B> to instead more like Coprod<A, Coprod<B, Never>>. The benefit of doing this is that nesting Either<A, B> will result in the enums getting fatter and fatter, where as the Coprod approach makes unlimited nested ors still only need space for 1 variant tag (turns out I was wrong about Coprod, it also grows the size).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestrfcExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions