Expand description
Raw FFI bindings to the ReadStat C library.
This crate provides auto-generated bindings via bindgen.
It compiles the ReadStat C source files from a vendored git submodule and links
against platform-specific iconv and zlib libraries.
These bindings expose the full ReadStat API, including support for SAS (.sas7bdat,
.xpt), SPSS (.sav, .zsav, .por), and Stata (.dta) file formats. However,
the higher-level readstat crate currently only implements
parsing and conversion for SAS .sas7bdat files.
Most users should depend on the higher-level readstat
crate instead of using these bindings directly.
Re-exports§
pub use self::readstat_type_e as readstat_type_t;pub use self::readstat_type_class_e as readstat_type_class_t;pub use self::readstat_measure_e as readstat_measure_t;pub use self::readstat_alignment_e as readstat_alignment_t;pub use self::readstat_compress_e as readstat_compress_t;pub use self::readstat_endian_e as readstat_endian_t;pub use self::readstat_error_e as readstat_error_t;pub use self::readstat_io_flags_e as readstat_io_flags_t;
Structs§
- __
Bindgen Bitfield Unit - mr_
set_ s - readstat_
callbacks_ s - readstat_
io_ s - readstat_
label_ set_ s - readstat_
metadata_ s - readstat_
missingness_ s - readstat_
parser_ s - readstat_
schema_ entry_ s - readstat_
schema_ s - readstat_
string_ ref_ s - readstat_
value_ label_ s - readstat_
value_ s - readstat_
variable_ s - readstat_
writer_ callbacks_ s - readstat_
writer_ s
Constants§
- readstat_
alignment_ e_ READSTAT_ ALIGNMENT_ CENTER - readstat_
alignment_ e_ READSTAT_ ALIGNMENT_ LEFT - readstat_
alignment_ e_ READSTAT_ ALIGNMENT_ RIGHT - readstat_
alignment_ e_ READSTAT_ ALIGNMENT_ UNKNOWN - readstat_
compress_ e_ READSTAT_ COMPRESS_ BINARY - readstat_
compress_ e_ READSTAT_ COMPRESS_ NONE - readstat_
compress_ e_ READSTAT_ COMPRESS_ ROWS - readstat_
endian_ e_ READSTAT_ ENDIAN_ BIG - readstat_
endian_ e_ READSTAT_ ENDIAN_ LITTLE - readstat_
endian_ e_ READSTAT_ ENDIAN_ NONE - readstat_
error_ e_ READSTAT_ ERROR_ BAD_ FORMAT_ STRING - readstat_
error_ e_ READSTAT_ ERROR_ BAD_ FREQUENCY_ WEIGHT - readstat_
error_ e_ READSTAT_ ERROR_ BAD_ MR_ STRING - readstat_
error_ e_ READSTAT_ ERROR_ BAD_ TIMESTAMP_ STRING - readstat_
error_ e_ READSTAT_ ERROR_ BAD_ TIMESTAMP_ VALUE - readstat_
error_ e_ READSTAT_ ERROR_ COLUMN_ COUNT_ MISMATCH - readstat_
error_ e_ READSTAT_ ERROR_ CONVERT - readstat_
error_ e_ READSTAT_ ERROR_ CONVERT_ BAD_ STRING - readstat_
error_ e_ READSTAT_ ERROR_ CONVERT_ LONG_ STRING - readstat_
error_ e_ READSTAT_ ERROR_ CONVERT_ SHORT_ STRING - readstat_
error_ e_ READSTAT_ ERROR_ MALLOC - readstat_
error_ e_ READSTAT_ ERROR_ NAME_ BEGINS_ WITH_ ILLEGAL_ CHARACTER - readstat_
error_ e_ READSTAT_ ERROR_ NAME_ CONTAINS_ ILLEGAL_ CHARACTER - readstat_
error_ e_ READSTAT_ ERROR_ NAME_ IS_ RESERVED_ WORD - readstat_
error_ e_ READSTAT_ ERROR_ NAME_ IS_ TOO_ LONG - readstat_
error_ e_ READSTAT_ ERROR_ NAME_ IS_ ZERO_ LENGTH - readstat_
error_ e_ READSTAT_ ERROR_ NOTE_ IS_ TOO_ LONG - readstat_
error_ e_ READSTAT_ ERROR_ NUMERIC_ VALUE_ IS_ OUT_ OF_ RANGE - readstat_
error_ e_ READSTAT_ ERROR_ OPEN - readstat_
error_ e_ READSTAT_ ERROR_ PARSE - readstat_
error_ e_ READSTAT_ ERROR_ READ - readstat_
error_ e_ READSTAT_ ERROR_ ROW_ COUNT_ MISMATCH - readstat_
error_ e_ READSTAT_ ERROR_ ROW_ IS_ TOO_ WIDE_ FOR_ PAGE - readstat_
error_ e_ READSTAT_ ERROR_ ROW_ WIDTH_ MISMATCH - readstat_
error_ e_ READSTAT_ ERROR_ SEEK - readstat_
error_ e_ READSTAT_ ERROR_ STRING_ REFS_ NOT_ SUPPORTED - readstat_
error_ e_ READSTAT_ ERROR_ STRING_ REF_ IS_ REQUIRED - readstat_
error_ e_ READSTAT_ ERROR_ STRING_ VALUE_ IS_ TOO_ LONG - readstat_
error_ e_ READSTAT_ ERROR_ TAGGED_ VALUES_ NOT_ SUPPORTED - readstat_
error_ e_ READSTAT_ ERROR_ TAGGED_ VALUE_ IS_ OUT_ OF_ RANGE - readstat_
error_ e_ READSTAT_ ERROR_ TOO_ FEW_ COLUMNS - readstat_
error_ e_ READSTAT_ ERROR_ TOO_ MANY_ COLUMNS - readstat_
error_ e_ READSTAT_ ERROR_ TOO_ MANY_ MISSING_ VALUE_ DEFINITIONS - readstat_
error_ e_ READSTAT_ ERROR_ UNSUPPORTED_ CHARSET - readstat_
error_ e_ READSTAT_ ERROR_ UNSUPPORTED_ COMPRESSION - readstat_
error_ e_ READSTAT_ ERROR_ UNSUPPORTED_ FILE_ FORMAT_ VERSION - readstat_
error_ e_ READSTAT_ ERROR_ USER_ ABORT - readstat_
error_ e_ READSTAT_ ERROR_ VALUE_ TYPE_ MISMATCH - readstat_
error_ e_ READSTAT_ ERROR_ WRITE - readstat_
error_ e_ READSTAT_ ERROR_ WRITER_ NOT_ INITIALIZED - readstat_
error_ e_ READSTAT_ OK - readstat_
io_ flags_ e_ READSTAT_ SEEK_ CUR - readstat_
io_ flags_ e_ READSTAT_ SEEK_ END - readstat_
io_ flags_ e_ READSTAT_ SEEK_ SET - readstat_
measure_ e_ READSTAT_ MEASURE_ NOMINAL - readstat_
measure_ e_ READSTAT_ MEASURE_ ORDINAL - readstat_
measure_ e_ READSTAT_ MEASURE_ SCALE - readstat_
measure_ e_ READSTAT_ MEASURE_ UNKNOWN - readstat_
type_ class_ e_ READSTAT_ TYPE_ CLASS_ NUMERIC - readstat_
type_ class_ e_ READSTAT_ TYPE_ CLASS_ STRING - readstat_
type_ e_ READSTAT_ TYPE_ DOUBLE - readstat_
type_ e_ READSTAT_ TYPE_ FLOAT - readstat_
type_ e_ READSTAT_ TYPE_ INT8 - readstat_
type_ e_ READSTAT_ TYPE_ INT16 - readstat_
type_ e_ READSTAT_ TYPE_ INT32 - readstat_
type_ e_ READSTAT_ TYPE_ STRING - readstat_
type_ e_ READSTAT_ TYPE_ STRING_ REF
Functions§
- readstat_
add_ ⚠label_ set - readstat_
add_ ⚠note - readstat_
add_ ⚠string_ ref - readstat_
add_ ⚠variable - readstat_
begin_ ⚠row - readstat_
begin_ ⚠writing_ dta - readstat_
begin_ ⚠writing_ por - readstat_
begin_ ⚠writing_ sas7bcat - readstat_
begin_ ⚠writing_ sas7bdat - readstat_
begin_ ⚠writing_ sav - readstat_
begin_ ⚠writing_ xport - readstat_
double_ ⚠value - readstat_
end_ ⚠row - readstat_
end_ ⚠writing - readstat_
error_ ⚠message - readstat_
float_ ⚠value - readstat_
get_ ⚠compression - readstat_
get_ ⚠creation_ time - readstat_
get_ ⚠endianness - readstat_
get_ ⚠file_ encoding - readstat_
get_ ⚠file_ format_ is_ 64bit - readstat_
get_ ⚠file_ format_ version - readstat_
get_ ⚠file_ label - readstat_
get_ ⚠modified_ time - readstat_
get_ ⚠multiple_ response_ sets - readstat_
get_ ⚠multiple_ response_ sets_ length - readstat_
get_ ⚠row_ count - readstat_
get_ ⚠string_ ref - readstat_
get_ ⚠table_ name - readstat_
get_ ⚠var_ count - readstat_
get_ ⚠variable - readstat_
insert_ ⚠double_ value - readstat_
insert_ ⚠float_ value - readstat_
insert_ ⚠int8_ value - readstat_
insert_ ⚠int16_ value - readstat_
insert_ ⚠int32_ value - readstat_
insert_ ⚠missing_ value - readstat_
insert_ ⚠string_ ref - readstat_
insert_ ⚠string_ value - readstat_
insert_ ⚠tagged_ missing_ value - readstat_
int8_ ⚠value - readstat_
int16_ ⚠value - readstat_
int32_ ⚠value - readstat_
io_ ⚠free - readstat_
label_ ⚠double_ value - readstat_
label_ ⚠int32_ value - readstat_
label_ ⚠string_ value - readstat_
label_ ⚠tagged_ value - readstat_
parse_ ⚠dta - readstat_
parse_ ⚠por - readstat_
parse_ ⚠sas7bcat - readstat_
parse_ ⚠sas7bdat - readstat_
parse_ ⚠sas_ commands - readstat_
parse_ ⚠sav - readstat_
parse_ ⚠spss_ commands - readstat_
parse_ ⚠stata_ dictionary - readstat_
parse_ ⚠txt - readstat_
parse_ ⚠xport - readstat_
parser_ ⚠free - readstat_
parser_ ⚠init - readstat_
schema_ ⚠free - readstat_
set_ ⚠close_ handler - readstat_
set_ ⚠data_ writer - readstat_
set_ ⚠error_ handler - readstat_
set_ ⚠file_ character_ encoding - readstat_
set_ ⚠fweight_ handler - readstat_
set_ ⚠handler_ character_ encoding - readstat_
set_ ⚠io_ ctx - readstat_
set_ ⚠metadata_ handler - readstat_
set_ ⚠note_ handler - readstat_
set_ ⚠open_ handler - readstat_
set_ ⚠progress_ handler - readstat_
set_ ⚠read_ handler - readstat_
set_ ⚠row_ limit - readstat_
set_ ⚠row_ offset - readstat_
set_ ⚠seek_ handler - readstat_
set_ ⚠update_ handler - readstat_
set_ ⚠value_ handler - readstat_
set_ ⚠value_ label_ handler - readstat_
set_ ⚠variable_ handler - readstat_
string_ ⚠value - readstat_
type_ ⚠class - readstat_
validate_ ⚠metadata - readstat_
validate_ ⚠variable - readstat_
value_ ⚠is_ defined_ missing - readstat_
value_ ⚠is_ missing - readstat_
value_ ⚠is_ system_ missing - readstat_
value_ ⚠is_ tagged_ missing - readstat_
value_ ⚠tag - readstat_
value_ ⚠type - readstat_
value_ ⚠type_ class - readstat_
variable_ ⚠add_ missing_ double_ range - readstat_
variable_ ⚠add_ missing_ double_ value - readstat_
variable_ ⚠add_ missing_ string_ range - readstat_
variable_ ⚠add_ missing_ string_ value - readstat_
variable_ ⚠get_ alignment - readstat_
variable_ ⚠get_ display_ width - readstat_
variable_ ⚠get_ format - readstat_
variable_ ⚠get_ index - readstat_
variable_ ⚠get_ index_ after_ skipping - readstat_
variable_ ⚠get_ label - readstat_
variable_ ⚠get_ measure - readstat_
variable_ ⚠get_ missing_ range_ hi - readstat_
variable_ ⚠get_ missing_ range_ lo - readstat_
variable_ ⚠get_ missing_ ranges_ count - readstat_
variable_ ⚠get_ name - readstat_
variable_ ⚠get_ storage_ width - readstat_
variable_ ⚠get_ type - readstat_
variable_ ⚠get_ type_ class - readstat_
variable_ ⚠set_ alignment - readstat_
variable_ ⚠set_ display_ width - readstat_
variable_ ⚠set_ format - readstat_
variable_ ⚠set_ label - readstat_
variable_ ⚠set_ label_ set - readstat_
variable_ ⚠set_ measure - readstat_
writer_ ⚠free - readstat_
writer_ ⚠init - readstat_
writer_ ⚠set_ compression - readstat_
writer_ ⚠set_ error_ handler - readstat_
writer_ ⚠set_ file_ format_ is_ 64bit - readstat_
writer_ ⚠set_ file_ format_ version - readstat_
writer_ ⚠set_ file_ label - readstat_
writer_ ⚠set_ file_ timestamp - readstat_
writer_ ⚠set_ fweight_ variable - readstat_
writer_ ⚠set_ table_ name
Type Aliases§
- __off_t
- __
time_ t - mr_
set_ t - off_t
- readstat_
alignment_ e - readstat_
begin_ data_ callback - readstat_
callbacks_ t - readstat_
close_ handler - readstat_
compress_ e - readstat_
data_ writer - readstat_
end_ data_ callback - readstat_
endian_ e - readstat_
error_ e - readstat_
error_ handler - readstat_
fweight_ handler - readstat_
io_ flags_ e - readstat_
io_ t - readstat_
label_ set_ t - readstat_
measure_ e - readstat_
metadata_ handler - readstat_
metadata_ ok_ callback - readstat_
metadata_ t - readstat_
missingness_ t - readstat_
module_ ctx_ free_ callback - readstat_
note_ handler - readstat_
off_ t - readstat_
open_ handler - readstat_
parser_ t - readstat_
progress_ handler - readstat_
read_ handler - readstat_
schema_ entry_ t - readstat_
schema_ t - readstat_
seek_ handler - readstat_
string_ ref_ t - readstat_
type_ class_ e - readstat_
type_ e - readstat_
update_ handler - readstat_
value_ handler - readstat_
value_ label_ handler - readstat_
value_ label_ t - readstat_
value_ t - readstat_
variable_ handler - readstat_
variable_ ok_ callback - readstat_
variable_ t - readstat_
variable_ width_ callback - readstat_
write_ double_ callback - readstat_
write_ float_ callback - readstat_
write_ int8_ callback - readstat_
write_ int16_ callback - readstat_
write_ int32_ callback - readstat_
write_ missing_ callback - readstat_
write_ row_ callback - readstat_
write_ string_ callback - readstat_
write_ string_ ref_ callback - readstat_
write_ tagged_ callback - readstat_
writer_ callbacks_ t - readstat_
writer_ t - time_t