Skip to content

Extra methods for Option #1597

Open
Open
@ghost

Description

I noticed that a few potentially useful methods convertingOption to Result aren't currently implemented: ok_or_default, err_or, err_or_else, and err_or_default.

ok_or_default could be useful as a complement to unwrap_or_default when converting Options to Results with a certain error type.

All of the err_or functions are complements to ok_or and aren't implemented at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions