@@ -163,6 +163,26 @@ impl streaming_iterator::DoubleEndedStreamingIterator for Tree {
163163///
164164/// // tables gets moved into our treeseq variable:
165165/// let treeseq = tables.tree_sequence(tskit::TreeSequenceFlags::default()).unwrap();
166+ /// assert_eq!(treeseq.nodes().num_rows(), 3);
167+ /// assert_eq!(treeseq.edges().num_rows(), 2);
168+ /// ```
169+ ///
170+ /// This type does not [`std::ops::DerefMut`] to [`crate::table_views::TableViews`]:
171+ ///
172+ /// ```compile_fail
173+ /// # let mut tables = tskit::TableCollection::new(1000.).unwrap();
174+ /// # tables.add_node(0, 1.0, tskit::PopulationId::NULL, tskit::IndividualId::NULL).unwrap();
175+ /// # tables.add_node(0, 0.0, tskit::PopulationId::NULL, tskit::IndividualId::NULL).unwrap();
176+ /// # tables.add_node(0, 0.0, tskit::PopulationId::NULL, tskit::IndividualId::NULL).unwrap();
177+ /// # tables.add_edge(0., 1000., 0, 1).unwrap();
178+ /// # tables.add_edge(0., 1000., 0, 2).unwrap();
179+ ///
180+ /// # // index
181+ /// # tables.build_index();
182+ ///
183+ /// # // tables gets moved into our treeseq variable:
184+ /// # let treeseq = tables.tree_sequence(tskit::TreeSequenceFlags::default()).unwrap();
185+ /// assert_eq!(treeseq.nodes_mut().num_rows(), 3);
166186/// ```
167187pub struct TreeSequence {
168188 pub ( crate ) inner : ll_bindings:: tsk_treeseq_t ,
0 commit comments