@@ -83,40 +83,40 @@ impl<'a> EdgeTable<'a> {
83
83
84
84
/// Return the ``parent`` value from row ``row`` of the table.
85
85
///
86
- /// # Errors
86
+ /// # Returns
87
87
///
88
- /// Will return [``IndexError``](crate::TskitError::IndexError)
89
- /// if ``row`` is out of range .
88
+ /// * `Some(parent)` if `u` is valid.
89
+ /// * `None` otherwise .
90
90
pub fn parent < E : Into < EdgeId > + Copy > ( & ' a self , row : E ) -> Option < NodeId > {
91
91
unsafe_tsk_column_access ! ( row. into( ) . 0 , 0 , self . num_rows( ) , self . table_. parent, NodeId )
92
92
}
93
93
94
94
/// Return the ``child`` value from row ``row`` of the table.
95
95
///
96
- /// # Errors
96
+ /// # Returns
97
97
///
98
- /// Will return [``IndexError``](crate::TskitError::IndexError)
99
- /// if ``row`` is out of range .
98
+ /// * `Some(child)` if `u` is valid.
99
+ /// * `None` otherwise .
100
100
pub fn child < E : Into < EdgeId > + Copy > ( & ' a self , row : E ) -> Option < NodeId > {
101
101
unsafe_tsk_column_access ! ( row. into( ) . 0 , 0 , self . num_rows( ) , self . table_. child, NodeId )
102
102
}
103
103
104
104
/// Return the ``left`` value from row ``row`` of the table.
105
105
///
106
- /// # Errors
106
+ /// # Returns
107
107
///
108
- /// Will return [``IndexError``](crate::TskitError::IndexError)
109
- /// if ``row`` is out of range .
108
+ /// * `Some(position)` if `u` is valid.
109
+ /// * `None` otherwise .
110
110
pub fn left < E : Into < EdgeId > + Copy > ( & ' a self , row : E ) -> Option < Position > {
111
111
unsafe_tsk_column_access ! ( row. into( ) . 0 , 0 , self . num_rows( ) , self . table_. left, Position )
112
112
}
113
113
114
114
/// Return the ``right`` value from row ``row`` of the table.
115
115
///
116
- /// # Errors
116
+ /// # Returns
117
117
///
118
- /// Will return [``IndexError``](crate::TskitError::IndexError)
119
- /// if ``row`` is out of range .
118
+ /// * `Some(position)` if `u` is valid.
119
+ /// * `None` otherwise .
120
120
pub fn right < E : Into < EdgeId > + Copy > ( & ' a self , row : E ) -> Option < Position > {
121
121
unsafe_tsk_column_access_and_map_into ! ( row. into( ) . 0 , 0 , self . num_rows( ) , self . table_. right)
122
122
}
0 commit comments