Open OWissett opened 1 year ago
Have a look around the code to see if there are other examples of this
Have a look around the code to see if there are other examples of this
Should I look at structure.rs specifically, or other Rust files within freesasa-rs as well?
Start at this one, but have a look to see if you can see any other bit fields
@asinineAbbreviations this is probably the ticket you want to start with. Its probably one of the easier tickets
I good way of doing this would be to create an enum which can be converted directly to the freesasa-sys
types
In C it is common for functions to take bit fields to specify options. This is not very good practice in Rust.
E.g.
In
structure.rs
, you will find:This takes an optional
c_int
value, which represents a bit field. This should be replaced with a function that simply has the function parameters in it. These parameters will need to be converted to the correct bit field, which is then given to this function.In this example, the program calls the C-API function
freesasa_structure_from_pdb
.See: https://freesasa.github.io/doxygen/group__structure.html#gacb6a13014452a7c3501fa7661d197f47