Skip to content

Type erasure needed for TableAccess trait and all table "iter" methods #148

@molpopgen

Description

@molpopgen

Several interfaces return objects implementing Iterator. Currently, the functions return a type for which Iterator is implemented, giving the mistaken impression that there's a struct whose implementation details need to be considered in client code. For most of these, however, all client code needs to worry about is that they impl Iterator. (In fact, I think this is true for all of them...)

We can make these types pub(crate), preventing the names from leaking from the library. Change the function declarations to reflect returning impl Iterator<type=X> (or Box<dyn ..> when the function is declared in a trait).

These changes won't break API as the interface remains unchanged.

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