std.csv.ErrorKind
class pub enum ErrorKind
A type indicating what kind of error is produced.
Constructors
Read
Read(Error)
An error produced when reading input.
This error is produced when the underlying stream of a Parser
produces an
error, or when more input is expected when parsing data such as a column, in
which case the error is std.io.Error.EndOfInput
.
MissingColumn
MissingColumn()
A column is expected, but we've either reached the end of the line or the end of the input stream.
UnexpectedCharacter
UnexpectedCharacter()
An unexpected character is encountered when parsing data (e.g. a double quote in an unquoted column).
Instance methods
!=
Show source codeHide source code
fn pub !=(other: T) -> Bool {
(self == other).false?
}
fn pub !=(other: T) -> Bool
Returns true
if self
and the given object are not equal to each other.
==
Show source codeHide source code
fn pub ==(other: ref ErrorKind) -> Bool {
match (self, other) {
case (Read(a), Read(b)) -> a == b
case (MissingColumn, MissingColumn) -> true
case (UnexpectedCharacter, UnexpectedCharacter) -> true
case _ -> false
}
}
fn pub ==(other: ref ErrorKind) -> Bool
Returns true
if self
and the given object are equal to each other.
This operator is used to perform structural equality. This means two objects residing in different memory locations may be considered equal, provided their structure is equal. For example, two different arrays may be considered to have structural equality if they contain the exact same values.
fmt
Show source codeHide source code
fn pub fmt(formatter: mut Formatter) {
match self {
case Read(v) -> formatter.tuple('Read').field(v).finish
case MissingColumn -> formatter.tuple('MissingColumn').finish
case UnexpectedCharacter -> formatter.tuple('UnexpectedCharacter').finish
}
}
fn pub fmt(formatter: mut Formatter)
Formats self
in a human-readable format for debugging purposes.
Implemented traits
Equal
impl Equal[ref ErrorKind] for ErrorKind
Format
impl Format for ErrorKind