Skip to content

der: Custom error types in derive macros. #1559

@turbocool3r

Description

@turbocool3r

Currently der_derive only provides macros that implement DecodeValue trait with Error associated type set to ::der::Error. It would be nice to have support for custom error types via an attribute as discussed in #1053.

# Current blocker

The problem is der::Reader lacks support for error types in its [sequence](https://docs.rs/der/latest/der/ trait.Reader.html#method.sequence), read_nested, decode and context_specific methods. I think each of these should gain an additional generic parameter for error type.

I have a patch almost ready so if this is ok, I will move on to create a PR.

Update: after some review I see generic parameters are already implemented in my previous PR 😄

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