Enum sdf::error::Error [] [src]

pub enum Error {
    BadArg(String),
    EndOfFile(String),
    InvalidChannel(u32),
    Io(Error),
    MissingChannel(Channel),
    MissingIndex(String),
    NoCalibrationTableForChannel(Channel),
    NotImplemented(String),
    Nul(NulError),
    Runtime(String),
    NeedSingleReferencePeak(usize),
    Utf8(Utf8Error),
    UnknownCode(i32),
    UnknownException(String),
    UnsupportedFormat(String),
}

Our error type.

Variants

A bad argument has been passed to sdfifc.

The end of an sdf file has been reached.

The specified channel is invalid.

A wrapper around a std::io::Error.

The channel is a valid channel, but we couldn't find it when we tried.

The sdf file is missing an index.

Some file-based operations, namely reads and seeks, require an index. Use File::reindex() to create one.

There is no calibration table for the given channel.

The given function is unimplemented by sdfifc.

A wrapper around std::ffi::NulError.

A runtime error on the part of sdfifc.

Either zero or more than one reference peak.

A wrapper around std::str::Utf8Error.

An unknown code has been provided to an error-mapping routine.

An unknown exception has occurred inside sdfifc.

The given sdf file is not in a supported format.

Methods

impl Error
[src]

Converts an i32 error code to an Error.

This function also calls last_error to get the error message from fwifc.

Panics

Panics if you pass in zero. That's because zero is not an error, and your code should not be trying to create an error if there isn't one.

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter.

impl Error for Error
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more

impl Display for Error
[src]

Formats the value using the given formatter. Read more

impl From<Error> for Error
[src]

Performs the conversion.

impl From<NulError> for Error
[src]

Performs the conversion.

impl From<Utf8Error> for Error
[src]

Performs the conversion.