[][src]Enum dbgen::error::ErrorKind

pub enum ErrorKind {
    ParseTemplate,
    UnknownFunction(String),
    IntegerOverflow(String),
    NotEnoughArguments(Function),
    InvalidRegex(String),
    UnknownRegexFlag(char),
    UnsupportedRegexElement(String),
    InvalidArgumentType {
        name: Function,
        index: usize,
        expected: &'static str,
    },
    InvalidArguments {
        name: Function,
        cause: String,
    },
    InvalidTimestampString(String),
    WriteSqlSchema,
    WriteSqlData,
    WriteSqlValue,
    // some variants omitted
}

Kinds of errors produced by the dbgen library.

Variants

ParseTemplate

Failed to parse template.

UnknownFunction(String)

Unknown SQL function.

IntegerOverflow(String)

Integer is too big.

NotEnoughArguments(Function)

Not enough arguments provided to the SQL function.

InvalidRegex(String)

Invalid regex.

UnknownRegexFlag(char)

Unknown regex flag.

UnsupportedRegexElement(String)

Unsupported regex element (e.g. \b)

InvalidArgumentType

Invalid argument type.

If this error is encountered during compilation phase, the error will be ignored and the function will be kept in raw form.

Fields of InvalidArgumentType

name: Function

The SQL function causing the error.

index: usize

Argument index.

expected: &'static str

The expected type.

InvalidArguments

Invalid arguments.

Fields of InvalidArguments

name: Function

The SQL function causing the error.

cause: String

Cause of the error.

InvalidTimestampString(String)

The timestamp string is invalid

WriteSqlSchema

Failed to write the SQL CREATE TABLE schema file.

WriteSqlData

Failed to write the SQL data file.

WriteSqlValue

Failed to write an SQL value.

Trait Implementations

impl Eq for ErrorKind[src]

impl PartialEq<ErrorKind> for ErrorKind[src]

impl Clone for ErrorKind[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<ErrorKind> for Error[src]

impl Debug for ErrorKind[src]

impl Display for ErrorKind[src]

impl Fail for ErrorKind[src]

default fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 
[src]

Provides context for this failure. Read more

default fn compat(self) -> Compat<Self>[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Auto Trait Implementations

impl Send for ErrorKind

impl Sync for ErrorKind

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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

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

default fn name(&self) -> Option<&str>[src]

Returns the "name" of the error. Read more

default fn cause(&self) -> Option<&(dyn Fail + 'static)>[src]

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

default fn backtrace(&self) -> Option<&Backtrace>[src]

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

default fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 
[src]

Provides context for this failure. Read more

default fn compat(self) -> Compat<Self>[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more