Skip to content

Add TableCollection functions to consume "row" objects #116

Open
@molpopgen

Description

@molpopgen

Named arguments are handy. Rust only really allows them for struct construction. So, we can "fake it" with an API like:

tables.add_node_table_row(NodeTableRow{ flags: 0, time: 0.1243, population: 2, individual: TSK_NULL, metadata: None }).unwrap()

Just have to check what the visibility of the row objects is. They are public, but maybe not currently from the crate root?

This is certainly undesirable to do "everywhere", but it is handy for the row adding fxns that are a bit long. The other functions that are long on the Python side are often shorter on the C side to to bit flags.

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