1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
pub mod bindings;
mod _macros;
mod edge_table;
pub mod error;
pub mod ffi;
mod flags;
mod individual_table;
pub mod metadata;
mod migration_table;
mod mutation_table;
mod node_table;
mod population_table;
mod site_table;
mod table_collection;
mod table_iterator;
mod traits;
mod trees;
pub mod types;
mod util;
pub use bindings::TSK_NODE_IS_SAMPLE;
pub use bindings::tsk_flags_t;
pub use bindings::tsk_id_t;
pub use bindings::tsk_size_t;
pub const TSK_NULL: tsk_id_t = -1;
pub use edge_table::{EdgeTable, EdgeTableRow};
pub use error::TskitError;
pub use flags::*;
pub use individual_table::{IndividualTable, IndividualTableRow};
pub use migration_table::{MigrationTable, MigrationTableRow};
pub use mutation_table::{MutationTable, MutationTableRow};
pub use node_table::{NodeTable, NodeTableRow};
pub use population_table::{PopulationTable, PopulationTableRow};
pub use site_table::{SiteTable, SiteTableRow};
pub use table_collection::TableCollection;
pub use traits::NodeIterator;
pub use traits::NodeListGenerator;
pub use traits::TableAccess;
pub use traits::TskitTypeAccess;
pub use trees::{NodeTraversalOrder, Tree, TreeSequence};
#[cfg(any(doc, feature = "provenance"))]
pub mod provenance;
pub type TskReturnValue = Result<i32, TskitError>;
pub fn version() -> &'static str {
return env!("CARGO_PKG_VERSION");
}
pub fn c_api_major_version() -> u32 {
bindings::TSK_VERSION_MAJOR
}
pub fn c_api_minor_version() -> u32 {
bindings::TSK_VERSION_MINOR
}
pub fn c_api_patch_version() -> u32 {
bindings::TSK_VERSION_PATCH
}
pub fn c_api_version() -> String {
format!(
"{}.{}.{}",
c_api_major_version(),
c_api_minor_version(),
c_api_patch_version()
)
}
#[cfg(test)]
mod tests {
use super::c_api_version;
#[test]
fn test_c_api_version() {
let _ = c_api_version();
}
}
mod test_fixtures;
mod test_simplification;
mod test_tsk_variables;