ReadStatCError

Enum ReadStatCError 

Source
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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromPrimitive for ReadStatCError

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a 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>

Converts an 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>

Converts an 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>

Converts an 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>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,