#[repr(transparent)]pub struct EdgeTable<'a> { /* private fields */ }
Expand description
An immutable view of an edge table.
These are not created directly.
Instead, use TableAccess::edges
to get a reference to an existing edge table;
Implementations
sourceimpl<'a> EdgeTable<'a>
impl<'a> EdgeTable<'a>
sourcepub fn parent<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<NodeId, TskitError>
pub fn parent<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<NodeId, TskitError>
Return the parent
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
sourcepub fn child<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<NodeId, TskitError>
pub fn child<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<NodeId, TskitError>
Return the child
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
sourcepub fn left<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<Position, TskitError>
pub fn left<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<Position, TskitError>
Return the left
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
sourcepub fn right<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<Position, TskitError>
pub fn right<E: Into<EdgeId> + Copy>(
&'a self,
row: E
) -> Result<Position, TskitError>
Return the right
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
pub fn metadata<T: MetadataRoundtrip>(
&'a self,
row: EdgeId
) -> Result<Option<T>, TskitError>
sourcepub fn iter(&self) -> impl Iterator<Item = EdgeTableRow> + '_
pub fn iter(&self) -> impl Iterator<Item = EdgeTableRow> + '_
Return an iterator over rows of the table.
The value of the iterator is EdgeTableRow
.
sourcepub fn row<E: Into<EdgeId> + Copy>(
&self,
r: E
) -> Result<EdgeTableRow, TskitError>
pub fn row<E: Into<EdgeId> + Copy>(
&self,
r: E
) -> Result<EdgeTableRow, 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 EdgeTable<'a>
impl<'a> !Send for EdgeTable<'a>
impl<'a> !Sync for EdgeTable<'a>
impl<'a> Unpin for EdgeTable<'a>
impl<'a> UnwindSafe for EdgeTable<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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