Search results

There are no results.

std.csv.ErrorKind

type pub inline enum ErrorKind[E]

A type indicating what kind of error is produced.

Constructors

EndOfInput

EndOfInput()

More input is required from the input stream.

MissingColumn

MissingColumn()

A column is expected, but we've either reached the end of the line or the end of the input stream.

Read

Read(E)

An error produced when reading from the underlying 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 code
Hide source code
fn pub !=(other: ref Self) -> Bool {
  (self == other).false?
}
fn pub !=(other: ref Self) -> Bool
if
  E: Equal

Returns true if self and the given object are not equal to each other.

==

Show source code
Hide source code
fn pub ==(other: ref ErrorKind[E]) -> Bool {
  match (self, other) {
    case (Read(a), Read(b)) -> a == b
    case (EndOfInput, EndOfInput) -> true
    case (MissingColumn, MissingColumn) -> true
    case (UnexpectedCharacter, UnexpectedCharacter) -> true
    case _ -> false
  }
}
fn pub ==(other: ref ErrorKind[E]) -> Bool
if
  E: Equal

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 code
Hide source code
fn pub fmt(formatter: mut Formatter) {
  match self {
    case Read(v) -> formatter.tuple('Read').field(v).finish
    case EndOfInput -> formatter.tuple('EndOfInput').finish
    case MissingColumn -> formatter.tuple('MissingColumn').finish
    case UnexpectedCharacter -> formatter.tuple('UnexpectedCharacter').finish
  }
}
fn pub fmt(formatter: mut Formatter)
if
  E: Format

Formats self in a human-readable format for debugging purposes.

Implemented traits

std.cmp.

Equal

impl Equal for ErrorKind
if
  E: Equal
std.fmt.

Format

impl Format for ErrorKind
if
  E: Format