Skip to content

Use Either enum, instead of creating multiple enums and manually implementing traits for each one #5513

Closed
@dullbananas

Description

@dullbananas

The messy enum problem mostly applies to enums in the apub crate. For example, SiteOrCommunityOrUser could become Either<ApubSite, Either<ApubCommunity, ApubUser>>. In this case, the activitypub_federation crate would have to implement its traits for Either.

Should be done after #5496 to avoid merge conflicts.

https://docs.rs/either/latest/either/enum.Either.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions