[−][src]Struct seq_io::ErrorPosition
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]
record_pos: Option<Position>,
err_offset: Option<ErrorOffset>,
id: Option<String>
) -> Self
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]
fn clone(&self) -> ErrorPosition
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ErrorPosition
[src]
impl Default for ErrorPosition
[src]
fn default() -> ErrorPosition
[src]
impl Display for ErrorPosition
[src]
impl Eq for ErrorPosition
[src]
impl PartialEq<ErrorPosition> for ErrorPosition
[src]
fn eq(&self, other: &ErrorPosition) -> bool
[src]
fn ne(&self, other: &ErrorPosition) -> bool
[src]
impl StructuralEq for ErrorPosition
[src]
impl StructuralPartialEq for ErrorPosition
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorPosition
impl Send for ErrorPosition
impl Sync for ErrorPosition
impl Unpin for ErrorPosition
impl UnwindSafe for ErrorPosition
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
const ALIGN: usize
type Init = T
The type for initializers.
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,