Enum ocl::Error [] [src]

pub enum Error {
    ErrCode(i32String),
    String(String),
    Nul(NulError),
    Io(Error),
    FromUtf8Error(FromUtf8Error),
}

An enum containing either a String or one of several other standard error types.

Implements the usual error traits.

Variants

ErrCode(i32String)String(String)Nul(NulError)Io(Error)FromUtf8Error(FromUtf8Error)

Methods

impl Error
[src]

fn new<S: Into<String>>(desc: S) -> Error

Returns a new Error with the description string: desc.

fn err<T, S: Into<String>>(desc: S) -> Result<T>

Returns a new ocl::Result::Err containing an ocl::Error with the given description.

fn errcode<T, S: Into<String>>(code: i32, desc: S) -> Result<T>

Returns a new ocl::Result::Err containing an ocl::Error with the given error code and description.

Trait Implementations

impl Error for Error
[src]

fn description(&self) -> &str

A short description of the error. Read more

fn cause(&self) -> Option<&Error>
1.0.0

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

impl Into<String> for Error
[src]

fn into(self) -> String

Performs the conversion.

impl From<String> for Error
[src]

fn from(desc: String) -> Error

Performs the conversion.

impl<'a> From<&'a str> for Error
[src]

fn from(desc: &'a str) -> Error

Performs the conversion.

impl From<NulError> for Error
[src]

fn from(err: NulError) -> Error

Performs the conversion.

impl From<Error> for Error
[src]

fn from(err: Error) -> Error

Performs the conversion.

impl From<FromUtf8Error> for Error
[src]

fn from(err: FromUtf8Error) -> Error

Performs the conversion.

impl Display for Error
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Debug for Error
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.