pub enum ReadStatCError {
Show 41 variants
READSTAT_OK = 0,
READSTAT_ERROR_OPEN = 1,
READSTAT_ERROR_READ = 2,
READSTAT_ERROR_MALLOC = 3,
READSTAT_ERROR_USER_ABORT = 4,
READSTAT_ERROR_PARSE = 5,
READSTAT_ERROR_UNSUPPORTED_COMPRESSION = 6,
READSTAT_ERROR_UNSUPPORTED_CHARSET = 7,
READSTAT_ERROR_COLUMN_COUNT_MISMATCH = 8,
READSTAT_ERROR_ROW_COUNT_MISMATCH = 9,
READSTAT_ERROR_ROW_WIDTH_MISMATCH = 10,
READSTAT_ERROR_BAD_FORMAT_STRING = 11,
READSTAT_ERROR_VALUE_TYPE_MISMATCH = 12,
READSTAT_ERROR_WRITE = 13,
READSTAT_ERROR_WRITER_NOT_INITIALIZED = 14,
READSTAT_ERROR_SEEK = 15,
READSTAT_ERROR_CONVERT = 16,
READSTAT_ERROR_CONVERT_BAD_STRING = 17,
READSTAT_ERROR_CONVERT_SHORT_STRING = 18,
READSTAT_ERROR_CONVERT_LONG_STRING = 19,
READSTAT_ERROR_NUMERIC_VALUE_IS_OUT_OF_RANGE = 20,
READSTAT_ERROR_TAGGED_VALUE_IS_OUT_OF_RANGE = 21,
READSTAT_ERROR_STRING_VALUE_IS_TOO_LONG = 22,
READSTAT_ERROR_TAGGED_VALUES_NOT_SUPPORTED = 23,
READSTAT_ERROR_UNSUPPORTED_FILE_FORMAT_VERSION = 24,
READSTAT_ERROR_NAME_BEGINS_WITH_ILLEGAL_CHARACTER = 25,
READSTAT_ERROR_NAME_CONTAINS_ILLEGAL_CHARACTER = 26,
READSTAT_ERROR_NAME_IS_RESERVED_WORD = 27,
READSTAT_ERROR_NAME_IS_TOO_LONG = 28,
READSTAT_ERROR_BAD_TIMESTAMP_STRING = 29,
READSTAT_ERROR_BAD_FREQUENCY_WEIGHT = 30,
READSTAT_ERROR_TOO_MANY_MISSING_VALUE_DEFINITIONS = 31,
READSTAT_ERROR_NOTE_IS_TOO_LONG = 32,
READSTAT_ERROR_STRING_REFS_NOT_SUPPORTED = 33,
READSTAT_ERROR_STRING_REF_IS_REQUIRED = 34,
READSTAT_ERROR_ROW_IS_TOO_WIDE_FOR_PAGE = 35,
READSTAT_ERROR_TOO_FEW_COLUMNS = 36,
READSTAT_ERROR_TOO_MANY_COLUMNS = 37,
READSTAT_ERROR_NAME_IS_ZERO_LENGTH = 38,
READSTAT_ERROR_BAD_TIMESTAMP_VALUE = 39,
READSTAT_ERROR_BAD_MR_STRING = 40,
}Expand description
Error codes returned by the ReadStat C library.
Each variant maps directly to a readstat_error_t value. A value of
READSTAT_OK indicates success; all other
variants represent specific failure conditions.
Variants§
READSTAT_OK = 0
Operation completed successfully.
READSTAT_ERROR_OPEN = 1
Failed to open the file.
READSTAT_ERROR_READ = 2
Failed to read from the file.
READSTAT_ERROR_MALLOC = 3
Memory allocation failure.
READSTAT_ERROR_USER_ABORT = 4
User-initiated abort via callback return value.
READSTAT_ERROR_PARSE = 5
General parse error in the file structure.
READSTAT_ERROR_UNSUPPORTED_COMPRESSION = 6
File uses an unsupported compression method.
READSTAT_ERROR_UNSUPPORTED_CHARSET = 7
File uses an unsupported character set.
READSTAT_ERROR_COLUMN_COUNT_MISMATCH = 8
Column count in header does not match actual columns.
READSTAT_ERROR_ROW_COUNT_MISMATCH = 9
Row count in header does not match actual rows.
READSTAT_ERROR_ROW_WIDTH_MISMATCH = 10
Row width in header does not match actual width.
READSTAT_ERROR_BAD_FORMAT_STRING = 11
Invalid or unrecognized format string.
READSTAT_ERROR_VALUE_TYPE_MISMATCH = 12
Value type does not match expected type.
READSTAT_ERROR_WRITE = 13
Failed to write output.
READSTAT_ERROR_WRITER_NOT_INITIALIZED = 14
Writer was not properly initialized before use.
READSTAT_ERROR_SEEK = 15
Failed to seek within the file.
READSTAT_ERROR_CONVERT = 16
Character encoding conversion failed.
READSTAT_ERROR_CONVERT_BAD_STRING = 17
Conversion failed due to invalid string data.
READSTAT_ERROR_CONVERT_SHORT_STRING = 18
String is too short for conversion.
READSTAT_ERROR_CONVERT_LONG_STRING = 19
String is too long for conversion.
READSTAT_ERROR_NUMERIC_VALUE_IS_OUT_OF_RANGE = 20
Numeric value is outside the representable range.
READSTAT_ERROR_TAGGED_VALUE_IS_OUT_OF_RANGE = 21
Tagged missing value is outside the valid range.
READSTAT_ERROR_STRING_VALUE_IS_TOO_LONG = 22
String value exceeds the maximum allowed length.
READSTAT_ERROR_TAGGED_VALUES_NOT_SUPPORTED = 23
Tagged missing values are not supported by this format.
READSTAT_ERROR_UNSUPPORTED_FILE_FORMAT_VERSION = 24
File format version is not supported.
READSTAT_ERROR_NAME_BEGINS_WITH_ILLEGAL_CHARACTER = 25
Variable name begins with an illegal character.
READSTAT_ERROR_NAME_CONTAINS_ILLEGAL_CHARACTER = 26
Variable name contains an illegal character.
READSTAT_ERROR_NAME_IS_RESERVED_WORD = 27
Variable name is a reserved word.
READSTAT_ERROR_NAME_IS_TOO_LONG = 28
Variable name exceeds the maximum allowed length.
READSTAT_ERROR_BAD_TIMESTAMP_STRING = 29
Timestamp string could not be parsed.
READSTAT_ERROR_BAD_FREQUENCY_WEIGHT = 30
Invalid frequency weight specification.
READSTAT_ERROR_TOO_MANY_MISSING_VALUE_DEFINITIONS = 31
Too many missing value definitions for a variable.
READSTAT_ERROR_NOTE_IS_TOO_LONG = 32
Note text exceeds the maximum allowed length.
READSTAT_ERROR_STRING_REFS_NOT_SUPPORTED = 33
String references are not supported by this format.
READSTAT_ERROR_STRING_REF_IS_REQUIRED = 34
A string reference is required but was not provided.
READSTAT_ERROR_ROW_IS_TOO_WIDE_FOR_PAGE = 35
Row is too wide for a single page.
READSTAT_ERROR_TOO_FEW_COLUMNS = 36
File has too few columns.
READSTAT_ERROR_TOO_MANY_COLUMNS = 37
File has too many columns.
READSTAT_ERROR_NAME_IS_ZERO_LENGTH = 38
Variable name is empty (zero length).
READSTAT_ERROR_BAD_TIMESTAMP_VALUE = 39
Timestamp value is invalid.
READSTAT_ERROR_BAD_MR_STRING = 40
Invalid multiple response (MR) set string.
Trait Implementations§
Source§impl Debug for ReadStatCError
impl Debug for ReadStatCError
Source§impl FromPrimitive for ReadStatCError
impl FromPrimitive for ReadStatCError
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreAuto Trait Implementations§
impl Freeze for ReadStatCError
impl RefUnwindSafe for ReadStatCError
impl Send for ReadStatCError
impl Sync for ReadStatCError
impl Unpin for ReadStatCError
impl UnwindSafe for ReadStatCError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more