pub struct MutationTable<'a> { /* private fields */ }Expand description
An immutable view of site table.
These are not created directly.
Instead, use TableCollection::mutations
to get a reference to an existing mutation table;
Implementations§
Source§impl<'a> MutationTable<'a>
impl<'a> MutationTable<'a>
Sourcepub fn num_rows(&'a self) -> tsk_size_t
pub fn num_rows(&'a self) -> tsk_size_t
Return the number of rows.
Sourcepub fn site(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitRustError>
pub fn site(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitRustError>
Return the site value from row row of the table.
§Errors
Will return IndexError
if row is out of range.
Sourcepub fn node(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitRustError>
pub fn node(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitRustError>
Return the node value from row row of the table.
§Errors
Will return IndexError
if row is out of range.
Sourcepub fn parent(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitRustError>
pub fn parent(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitRustError>
Return the parent value from row row of the table.
§Errors
Will return IndexError
if row is out of range.
Sourcepub fn time(&'a self, row: tsk_id_t) -> Result<f64, TskitRustError>
pub fn time(&'a self, row: tsk_id_t) -> Result<f64, TskitRustError>
Return the time value from row row of the table.
§Errors
Will return IndexError
if row is out of range.
Sourcepub fn derived_state(
&'a self,
row: tsk_id_t,
) -> Result<Option<Vec<u8>>, TskitRustError>
pub fn derived_state( &'a self, row: tsk_id_t, ) -> Result<Option<Vec<u8>>, TskitRustError>
Get the derived_state value from row row of the table.
§Return
Will return None if there is no derived state.
§Errors
Will return IndexError
if row is out of range.
Auto Trait Implementations§
impl<'a> Freeze for MutationTable<'a>
impl<'a> RefUnwindSafe for MutationTable<'a>
impl<'a> !Send for MutationTable<'a>
impl<'a> !Sync for MutationTable<'a>
impl<'a> Unpin for MutationTable<'a>
impl<'a> UnwindSafe for MutationTable<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more