Skip to content

Commit e7ca0c7

Browse files
committed
relocate enum
1 parent 0acd449 commit e7ca0c7

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@ pub use node_table::{NodeDefaults, NodeDefaultsWithMetadata, NodeTable, NodeTabl
115115
pub use population_table::{PopulationTable, PopulationTableRow};
116116
pub use site_table::{SiteTable, SiteTableRow};
117117
pub use sys::flags::*;
118+
pub use sys::NodeTraversalOrder;
118119
pub use table_collection::TableCollection;
119120
pub use traits::IndividualLocation;
120121
pub use traits::IndividualParents;
121-
pub use tree_interface::{NodeTraversalOrder, TreeInterface};
122+
pub use tree_interface::TreeInterface;
122123
pub use trees::{Tree, TreeSequence};
123124

124125
// Optional features

src/sys/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub use provenance_table::ProvenanceTable;
4242
pub use site_table::SiteTable;
4343
pub use table_collection::*;
4444
pub use tree::LLTree;
45+
pub use tree::NodeTraversalOrder;
4546
pub use treeseq::TreeSequence;
4647

4748
use traits::TskTeardown;

src/sys/tree.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,15 @@ impl NodeIterator for SamplesIterator<'_> {
286286
self.current_node
287287
}
288288
}
289+
290+
#[non_exhaustive]
291+
pub enum NodeTraversalOrder {
292+
///Preorder traversal, starting at the root(s) of a [`TreeInterface`].
293+
///For trees with multiple roots, start at the left root,
294+
///traverse to tips, proceeed to the next root, etc..
295+
Preorder,
296+
///Postorder traversal, starting at the root(s) of a [`TreeInterface`].
297+
///For trees with multiple roots, start at the left root,
298+
///traverse to tips, proceeed to the next root, etc..
299+
Postorder,
300+
}

0 commit comments

Comments
 (0)