pub trait TableAccess {
Show 16 methods fn edges(&self) -> EdgeTable<'_>; fn nodes(&self) -> NodeTable<'_>; fn mutations(&self) -> MutationTable<'_>; fn sites(&self) -> SiteTable<'_>; fn populations(&self) -> PopulationTable<'_>; fn migrations(&self) -> MigrationTable<'_>; fn individuals(&self) -> IndividualTable<'_>; fn provenances(&self) -> ProvenanceTable<'_>; fn edges_iter(&self) -> Box<dyn Iterator<Item = EdgeTableRow>> { ... } fn nodes_iter(&self) -> Box<dyn Iterator<Item = NodeTableRow>> { ... } fn mutations_iter(&self) -> Box<dyn Iterator<Item = MutationTableRow>> { ... } fn sites_iter(&self) -> Box<dyn Iterator<Item = SiteTableRow>> { ... } fn populations_iter(&self) -> Box<dyn Iterator<Item = PopulationTableRow>> { ... } fn migrations_iter(&self) -> Box<dyn Iterator<Item = MigrationTableRow>> { ... } fn individuals_iter(&self) -> Box<dyn Iterator<Item = IndividualTableRow>> { ... } fn provenances_iter(&self) -> Box<dyn Iterator<Item = ProvenanceTableRow>> { ... }
}
Expand description

Immutable access to tables.

For objects that contain the full suite of tables, implementing this trait provides immutable access to their data.

For most types, the provided implementations of _iter methods should do.

Examples

use tskit::TableAccess;

let mut tables = tskit::TableCollection::new(1.).unwrap();
// The borrows are immuatble, so we can
// take multiple table references from the same object.
let e = tables.edges();
let n = tables.nodes();

The borrow checker will keep you from getting in trouble:

use tskit::TableAccess;

let mut tables = tskit::TableCollection::new(1.).unwrap();
let e = tables.edges();
tables.add_edge(0.0, 1.0, 0, 1).unwrap();
let p = e.parent(0).unwrap();   // FAIL!

Required Methods

Get reference to the EdgeTable.

Get reference to the NodeTable.

Get reference to the MutationTable.

Get reference to the SiteTable.

Get reference to the PopulationTable.

Get reference to the MigrationTable.

Get reference to the IndividualTable.

Get reference to the ProvenanceTable

Provided Methods

Return an iterator over the edges.

Return an iterator over the nodes.

Return an iterator over the mutations.

Return an iterator over the sites.

Return an iterator over the populations.

Return an iterator over the migration events.

Return an iterator over the individuals.

Return an iterator over provenances

Implementors