File tree Expand file tree Collapse file tree 8 files changed +56
-0
lines changed
Expand file tree Collapse file tree 8 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,13 @@ impl EdgeTable {
197197 Ok ( Self { table_ } )
198198 }
199199
200+ // # Safety
201+ //
202+ // * this fn must NEVER by part of the public API
203+ // * all returned values must only be visible to the public API
204+ // by REFERENCE (& or &mut)
205+ // * the input ptr must not be NULL
206+ // * the input ptr must point to an initialized table
200207 pub ( crate ) unsafe fn new_from_table (
201208 edges : * mut ll_bindings:: tsk_edge_table_t ,
202209 ) -> Result < Self , TskitError > {
Original file line number Diff line number Diff line change @@ -183,6 +183,13 @@ impl Iterator for IndividualTableIterator {
183183}
184184
185185impl IndividualTable {
186+ // # Safety
187+ //
188+ // * this fn must NEVER by part of the public API
189+ // * all returned values must only be visible to the public API
190+ // by REFERENCE (& or &mut)
191+ // * the input ptr must not be NULL
192+ // * the input ptr must point to an initialized table
186193 pub ( crate ) unsafe fn new_from_table (
187194 individuals : * mut ll_bindings:: tsk_individual_table_t ,
188195 ) -> Result < Self , TskitError > {
Original file line number Diff line number Diff line change @@ -211,6 +211,13 @@ pub struct MigrationTable {
211211}
212212
213213impl MigrationTable {
214+ // # Safety
215+ //
216+ // * this fn must NEVER by part of the public API
217+ // * all returned values must only be visible to the public API
218+ // by REFERENCE (& or &mut)
219+ // * the input ptr must not be NULL
220+ // * the input ptr must point to an initialized table
214221 pub ( crate ) unsafe fn new_from_table (
215222 migrations : * mut ll_bindings:: tsk_migration_table_t ,
216223 ) -> Result < Self , TskitError > {
Original file line number Diff line number Diff line change @@ -207,6 +207,13 @@ pub struct MutationTable {
207207}
208208
209209impl MutationTable {
210+ // # Safety
211+ //
212+ // * this fn must NEVER by part of the public API
213+ // * all returned values must only be visible to the public API
214+ // by REFERENCE (& or &mut)
215+ // * the input ptr must not be NULL
216+ // * the input ptr must point to an initialized table
210217 pub ( crate ) unsafe fn new_from_table (
211218 mutations : * mut ll_bindings:: tsk_mutation_table_t ,
212219 ) -> Result < Self , TskitError > {
Original file line number Diff line number Diff line change @@ -439,6 +439,13 @@ impl NodeTable {
439439 Ok ( Self { table_ } )
440440 }
441441
442+ // # Safety
443+ //
444+ // * this fn must NEVER by part of the public API
445+ // * all returned values must only be visible to the public API
446+ // by REFERENCE (& or &mut)
447+ // * the input ptr must not be NULL
448+ // * the input ptr must point to an initialized table
442449 pub ( crate ) unsafe fn new_from_table (
443450 nodes : * mut ll_bindings:: tsk_node_table_t ,
444451 ) -> Result < Self , TskitError > {
Original file line number Diff line number Diff line change @@ -157,6 +157,13 @@ pub struct PopulationTable {
157157}
158158
159159impl PopulationTable {
160+ // # Safety
161+ //
162+ // * this fn must NEVER by part of the public API
163+ // * all returned values must only be visible to the public API
164+ // by REFERENCE (& or &mut)
165+ // * the input ptr must not be NULL
166+ // * the input ptr must point to an initialized table
160167 pub ( crate ) unsafe fn new_from_table (
161168 populations : * mut ll_bindings:: tsk_population_table_t ,
162169 ) -> Result < Self , TskitError > {
Original file line number Diff line number Diff line change @@ -154,6 +154,13 @@ pub struct ProvenanceTable {
154154}
155155
156156impl ProvenanceTable {
157+ // # Safety
158+ //
159+ // * this fn must NEVER by part of the public API
160+ // * all returned values must only be visible to the public API
161+ // by REFERENCE (& or &mut)
162+ // * the input ptr must not be NULL
163+ // * the input ptr must point to an initialized table
157164 pub ( crate ) unsafe fn new_from_table (
158165 provenances : * mut ll_bindings:: tsk_provenance_table_t ,
159166 ) -> Result < Self , crate :: TskitError > {
Original file line number Diff line number Diff line change @@ -176,6 +176,13 @@ pub struct SiteTable {
176176}
177177
178178impl SiteTable {
179+ // # Safety
180+ //
181+ // * this fn must NEVER by part of the public API
182+ // * all returned values must only be visible to the public API
183+ // by REFERENCE (& or &mut)
184+ // * the input ptr must not be NULL
185+ // * the input ptr must point to an initialized table
179186 pub ( crate ) unsafe fn new_from_table (
180187 sites : * mut ll_bindings:: tsk_site_table_t ,
181188 ) -> Result < Self , TskitError > {
You can’t perform that action at this time.
0 commit comments