Struct tskit::MigrationTable

source ·
pub struct MigrationTable { /* private fields */ }
Expand description

An immutable view of a migration table.

These are not created directly but are accessed by types implementing std::ops::Deref to crate::table_views::TableViews

Implementations

Return the number of rows

Return the left coordinate for a given row.

Returns
  • Some(position) if row is valid.
  • None otherwise.

Return the right coordinate for a given row.

Returns
  • Some(positions) if row is valid.
  • None otherwise.

Return the node for a given row.

Returns
  • Some(node) if row is valid.
  • None otherwise.

Return the source population for a given row.

Returns
  • Some(population) if row is valid.
  • None otherwise.

Return the destination population for a given row.

Returns
  • Some(population) if row is valid.
  • None otherwise.

Return the time of the migration event for a given row.

Returns
  • Some(time) if row is valid.
  • None otherwise.

Retrieve decoded metadata for a row.

Returns
  • Some(Ok(T)) if row is valid and decoding succeeded.
  • Some(Err(_)) if row is not valid and decoding failed.
  • None if row is not valid.
Errors
Examples.

The big-picture semantics are the same for all table types. See crate::IndividualTable::metadata for examples.

Return an iterator over rows of the table. The value of the iterator is MigrationTableRow.

Return row r of the table.

Parameters
  • r: the row id.
Returns
  • Some(row) if r is valid
  • None otherwise

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Drops the content pointed by this pointer and frees it. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.