use opaque enums for API structs
add test case for boundary check (get_substring)
use opaque enums for API structs
add high-level structs