[][src]Struct seq_io::ErrorPosition

pub struct ErrorPosition { /* fields omitted */ }

Position of a parsing error within the file

Implementations

impl ErrorPosition[src]

pub fn new(
    record_pos: Option<Position>,
    err_offset: Option<ErrorOffset>,
    id: Option<String>
) -> Self
[src]

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

Returns the exact position, where the error occurred or the record start if there is no specific position. None can be returned if the position is not known because the error occurred in a call to BaseRecord::check_lengths(). Errors returned by any of the readers directly (not record instances) are guaranteed to always have a defined position.

In contrast to the position returned by the function ErrorPosition::record_position(), an optional ErrorOffset is applied to the sequence record position (see ErrorPosition::error_offset()) to obtain the exact line and byte position of the error.

pub fn record_id(&self) -> Option<&str>[src]

Returns the ID of the record where the error occurred, if available. If parsing already failed within the sequence header, None is returned. Invalid UTF-8 bytes are replaced (see String::from_utf8_lossy).

pub fn record_position(&self) -> Option<&Position>[src]

Returns a reference to the Position describing the line and byte offset of the sequence record, where the error occurred (if known, see position()).

pub fn error_offset(&self) -> Option<&ErrorOffset>[src]

Returns the offset (line / byte) from the record start, at which the error occurred, if available.

Trait Implementations

impl Clone for ErrorPosition[src]

impl Debug for ErrorPosition[src]

impl Default for ErrorPosition[src]

impl Display for ErrorPosition[src]

impl Eq for ErrorPosition[src]

impl PartialEq<ErrorPosition> for ErrorPosition[src]

impl StructuralEq for ErrorPosition[src]

impl StructuralPartialEq for ErrorPosition[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.