[][src]Enum pcd_rs::error::PcdError

pub enum PcdError {
    ParseError {
        line: usize,
        desc: String,
    },
    SchemaMismatchError {
        expect: Vec<(Option<String>, ValueKind, Option<usize>)>,
        found: Vec<(String, ValueKind, usize)>,
    },
    FieldSizeMismatchError {
        field_name: String,
        expect: usize,
        found: usize,
    },
    TextTokenMismatchError {
        expect: usize,
        found: usize,
    },
    InvalidArgumentError {
        desc: String,
    },
}

The error returned from the crate.

Variants

ParseError

Fields of ParseError

line: usizedesc: String
SchemaMismatchError

Fields of SchemaMismatchError

expect: Vec<(Option<String>, ValueKind, Option<usize>)>found: Vec<(String, ValueKind, usize)>
FieldSizeMismatchError

Fields of FieldSizeMismatchError

field_name: Stringexpect: usizefound: usize
TextTokenMismatchError

Fields of TextTokenMismatchError

expect: usizefound: usize
InvalidArgumentError

Fields of InvalidArgumentError

desc: String

Methods

impl PcdError[src]

pub fn new_parse_error(line: usize, desc: &str) -> PcdError[src]

pub fn new_schema_mismatch_error(
    record_fields: &[(Option<String>, ValueKind, Option<usize>)],
    file_fields: &[FieldDef]
) -> PcdError
[src]

pub fn new_field_size_mismatch_error(
    field_name: &str,
    expect: usize,
    found: usize
) -> PcdError
[src]

pub fn new_text_token_mismatch_error(expect: usize, found: usize) -> PcdError[src]

pub fn new_invalid_argument_error(desc: &str) -> PcdError[src]

Trait Implementations

impl Debug for PcdError[src]

impl Display for PcdError[src]

impl Fail for PcdError[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> AsFail for T where
    T: Fail
[src]

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

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

impl<E> Fail for E where
    E: 'static + Error + Send + Sync
[src]

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

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

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.