Enum yenc::DecodeError [−][src]
pub enum DecodeError { IncompleteData { expected_size: usize, actual_size: usize, }, InvalidHeader { line: String, position: usize, }, InvalidChecksum, IoError(Error), }
Error enum for errors that can be encountered while decoding.
Variants
IncompleteData
Fewer or more bytes than expected.
Fields of IncompleteData
expected_size: usize | the expected size, as specified in the yenc header |
actual_size: usize | the actual size, as found while reading |
InvalidHeader
The header or footer line contains unexpected characters or is incomplete.
Fields of InvalidHeader
line: String | the header line |
position: usize | the position in the line where the parsing error occurred |
InvalidChecksum
CRC32 checksum of the part is not the expected checksum.
IoError(Error)
An I/O error occurred.
Trait Implementations
impl Debug for DecodeError
[src]
impl Debug for DecodeError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Error> for DecodeError
[src]
impl From<Error> for DecodeError
fn from(error: Error) -> DecodeError
[src]
fn from(error: Error) -> DecodeError
Performs the conversion.
impl Display for DecodeError
[src]
impl Display for DecodeError
Auto Trait Implementations
impl Send for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Sync for DecodeError