Skip to content

Provide a trait to enable dynamic collection of captures into a custom type #2

Description

@whitfin

Currently all captures are Vec<(&str, (usize, usize))>. This is probably the most efficient way we can go by default, but it's not particularly friendly for those who need to then change this type into something else (e.g. HashMap<&str, String>. It would be better if we could go directly into that type at capture time.

This would avoid an unnecessary Vec allocation, and save a few cycles for the actual parsing. It is likely also easier for the developer to provide the trait implementation, rather than manually parsing out their values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions