pub enum SdCardError {
FileTooSmall {
expected: usize,
actual: usize,
},
InvalidModelString {
found: String,
},
MissingBom,
InvalidUtf16Length {
len: usize,
},
Utf16Decode {
detail: String,
},
ColumnCount {
line: usize,
expected: usize,
actual: usize,
},
InvalidField {
line: usize,
column: String,
detail: String,
},
ChannelParse {
index: u16,
detail: String,
},
InvalidWavHeader {
detail: String,
},
UnexpectedAudioFormat {
sample_rate: u32,
bits_per_sample: u16,
channels: u16,
},
InvalidBmpHeader {
detail: String,
},
UnexpectedImageFormat {
width: u32,
height: u32,
bits_per_pixel: u16,
},
}Expand description
Errors that can occur when parsing SD card files.
Variants§
FileTooSmall
The file is too small to contain the expected data.
InvalidModelString
The .d75 file header contains an unrecognised model string.
MissingBom
A UTF-16LE encoded file is missing the byte order mark (BOM).
InvalidUtf16Length
A UTF-16LE file contains an odd number of bytes (invalid encoding).
Utf16Decode
A UTF-16 code unit sequence could not be decoded.
ColumnCount
A TSV row has an unexpected number of columns.
Fields
InvalidField
A required field in a TSV row is empty or invalid.
Fields
ChannelParse
A channel entry in the .d75 binary could not be parsed.
Fields
InvalidWavHeader
A WAV file header is invalid or corrupt.
UnexpectedAudioFormat
A WAV file has a valid header but unexpected audio format (not matching TH-D75 spec: 16 kHz, 16-bit, mono).
Fields
InvalidBmpHeader
A BMP file header is invalid or corrupt.
UnexpectedImageFormat
A BMP file has a valid header but unexpected image format (not matching TH-D75 spec: 240x180, 24-bit).
Trait Implementations§
Source§impl Clone for SdCardError
impl Clone for SdCardError
Source§fn clone(&self) -> SdCardError
fn clone(&self) -> SdCardError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more