Struct tskit::IndividualTable
source · [−]pub struct IndividualTable<'a> { /* private fields */ }
Expand description
An immutable view of a individual table.
These are not created directly.
Instead, use TableCollection::individuals
to get a reference to an existing node table;
Implementations
sourceimpl<'a> IndividualTable<'a>
impl<'a> IndividualTable<'a>
sourcepub fn flags<I: Into<IndividualId> + Copy>(
&self,
row: I
) -> Result<IndividualFlags, TskitError>
pub fn flags<I: Into<IndividualId> + Copy>(
&self,
row: I
) -> Result<IndividualFlags, TskitError>
sourcepub fn location<I: Into<IndividualId> + Copy>(
&self,
row: I
) -> Result<Option<Vec<Location>>, TskitError>
pub fn location<I: Into<IndividualId> + Copy>(
&self,
row: I
) -> Result<Option<Vec<Location>>, TskitError>
sourcepub fn parents<I: Into<IndividualId> + Copy>(
&self,
row: I
) -> Result<Option<Vec<IndividualId>>, TskitError>
pub fn parents<I: Into<IndividualId> + Copy>(
&self,
row: I
) -> Result<Option<Vec<IndividualId>>, TskitError>
sourcepub fn metadata<T: MetadataRoundtrip>(
&'a self,
row: IndividualId
) -> Result<Option<T>, TskitError>
pub fn metadata<T: MetadataRoundtrip>(
&'a self,
row: IndividualId
) -> Result<Option<T>, TskitError>
sourcepub fn iter(&self) -> impl Iterator<Item = IndividualTableRow> + '_
pub fn iter(&self) -> impl Iterator<Item = IndividualTableRow> + '_
Return an iterator over rows of the table.
The value of the iterator is IndividualTableRow
.
sourcepub fn row<I: Into<IndividualId> + Copy>(
&self,
r: I
) -> Result<IndividualTableRow, TskitError>
pub fn row<I: Into<IndividualId> + Copy>(
&self,
r: I
) -> Result<IndividualTableRow, TskitError>
Return row r
of the table.
Parameters
r
: the row id.
Errors
TskitError::IndexError
if r
is out of range.
Auto Trait Implementations
impl<'a> RefUnwindSafe for IndividualTable<'a>
impl<'a> !Send for IndividualTable<'a>
impl<'a> !Sync for IndividualTable<'a>
impl<'a> Unpin for IndividualTable<'a>
impl<'a> UnwindSafe for IndividualTable<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more