[][src]Enum seq_io::fastx::ErrorKind

pub enum ErrorKind {
    Io(Error),
    InvalidStart {
        pos: ErrorPosition,
        found: u8,
    },
    InvalidSep {
        pos: ErrorPosition,
        found: Option<u8>,
    },
    UnexpectedEnd {
        pos: ErrorPosition,
    },
    UnequalLengths {
        pos: ErrorPosition,
        seq: usize,
        qual: usize,
    },
    BufferLimit,
    // some variants omitted
}

The kind of error. Currently it has the same options as seq_io::fastq::ErrorKind.

Variants

Io(Error)

std::io::Error

InvalidStart

Invalid start byte encountered (expected > or @, depending on the format). This error occurs either at the beginning of the file if the first byte of the first non-empty line does matches neither of the two possible characters, required for either FASTA or FASTQ. In later records, this error will be returned if the start byte of a record does not match the expected byte chosen at the beginning.

Fields of InvalidStart

pos: ErrorPosition

Position, where the error occurred. ErrorPosition::position() returns the record start (same as ErrorPosition::record_position()), ErrorPosition::error_offset() will return None.

found: u8

Byte found instead.

InvalidSep

Invalid separator byte encountered (expected +). This error cannot occur with multi-line FASTQ.

Fields of InvalidSep

pos: ErrorPosition

Position, where the error occurred. ErrorPosition::position() returns the position of the byte that should be +.

found: Option<u8>

Byte found instead (Some if any, otherwise None)

UnexpectedEnd

Truncated record found at the end of the input.

Fields of UnexpectedEnd

pos: ErrorPosition

Position, where the error occurred. ErrorPosition::position() returns a Position referring to the last byte of the file. ErrorPosition::record_id() only returns an ID if the unexpected end did not occur in within the header line. In this case, the ID may be truncated.

UnequalLengths

Sequence and qualitiy lengths found to be different.

Fields of UnequalLengths

pos: ErrorPosition

Position, where the error occurred. ErrorPosition::position() returns the record start (same as ErrorPosition::record_position()), ErrorPosition::error_offset() will return None. The position will be None if the error occurred in a call to BaseRecord::check_lengths.

seq: usize

Length of sequence

qual: usize

Length of quality information

BufferLimit

Size limit of buffer was reached, which happens if policy::BufPolicy::grow_to() returned None. This does not happen with the default DoubleUntil policy, since this policy does not impose a memory limit.

Implementations

impl ErrorKind[src]

pub fn position(&self) -> Option<&ErrorPosition>[src]

Returns the position for this error, if one exists.

Trait Implementations

impl Debug for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.