Enum ocl::Error [] [src]

pub enum Error {
    Status {
        status: Status,
        fn_name: &'static str,
        fn_info: String,
        desc: String,
    },
    String(String),
    Nul(NulError),
    Io(Error),
    FromUtf8Error(FromUtf8Error),
    UnspecifiedDimensions,
}

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

Implements the usual error traits.

Variants

Status

Fields

status: Status
fn_name: &'static str
fn_info: String
desc: String
String(String)Nul(NulError)Io(Error)FromUtf8Error(FromUtf8Error)UnspecifiedDimensions

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 err_status<T: Default, S: Into<String>>(errcode: i32, fn_name: &'static str, fn_info: S) -> Result<T>

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

fn prepend<'s, S: AsRef<&'s str>>(&'s mut self, txt: S)

If this is a String variant, concatenate txt to the front of the contained string. Otherwise, do nothing at all.

fn status_code(&self) -> String

Returns the error status const code name or nothing.

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.