Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Derive support for From implementations #275

Open
@vorner

Description

@vorner

Oftentimes, a custom error is an enum with variants, some of which are just wrappers around some foreign errors/causes.

The derive machinery allows for marking the field as #[cause], like this:

https://boats.gitlab.io/failure/derive-fail.html#overriding-cause

Would it make sense to add possibility to also derive From for such a newtype-style variant, eg by adding #[from] attribute to it?

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