Enum gds21::GdsError[][src]

pub enum GdsError {
    RecordDecode(GdsRecordTypeGdsDataTypeu16),
    RecordLen(usize),
    InvalidDataType(u8),
    InvalidRecordType(u8),
    Unsupported(Option<GdsRecord>, Option<GdsContext>),
    Parse {
        msg: String,
        record: GdsRecord,
        recordnum: usize,
        bytepos: u64,
        ctx: Vec<GdsContext>,
    },
    Boxed(Box<dyn Error>),
    Str(String),
}
Expand description

Gds Error Enumeration

Most errors are tied in some sense to parsing and decoding. Once a valid GdsLibrary is created in memory, it can generally be streamed to bytes.

Variants

RecordDecode(GdsRecordTypeGdsDataTypeu16)

Invalid binary -> record conversion

Tuple Fields of RecordDecode

0: GdsRecordType1: GdsDataType2: u16
RecordLen(usize)

Invalid record length

Tuple Fields of RecordLen

0: usize
InvalidDataType(u8)

Invalid data type

Tuple Fields of InvalidDataType

0: u8
InvalidRecordType(u8)

Invalid record type

Tuple Fields of InvalidRecordType

0: u8

Unsupported feature, in the decoded context

Tuple Fields of Unsupported

0: Option<GdsRecord>1: Option<GdsContext>
Parse

Parser Errors

Fields of Parse

msg: Stringrecord: GdsRecordrecordnum: usizebytepos: u64ctx: Vec<GdsContext>
Boxed(Box<dyn Error>)

Boxed (External) Errors

Tuple Fields of Boxed

0: Box<dyn Error>
Str(String)

Other errors

Tuple Fields of Str

0: String

Trait Implementations

Formats the value using the given formatter. Read more

Display a GdsError. This functionally delegates to the (derived) std::fmt::Debug implementation. Maybe more info that wanted in some cases. But certainly enough.

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.