Struct ocl_core::error::Error
[−]
[src]
pub struct Error { pub kind: ErrorKind, pub cause: Option<Box<Error>>, }
An Error.
Fields
kind: ErrorKind
cause: Option<Box<Error>>
Methods
impl Error
[src]
fn new<S: Into<String>>(desc: S) -> Self
[src]
: Use ::from
instead.
fn string<S: Into<String>>(desc: S) -> Self
[src]
: Use ::from
instead.
Returns a new ErrorKind::String
with the given description.
fn unspecified_dimensions() -> Error
[src]
Returns an Error
with the UnspecifiedDimensions
kind variant.
fn version_low(detected: OpenclVersion, required: OpenclVersion) -> Error
[src]
fn err<T, S: Into<String>>(desc: S) -> Result<T>
[src]
: Use Err("...".into())
instead.
Returns a new ocl_core::Result::Err
containing an
ocl_core::ErrorKind::String
variant with the given description.
Deprecated
Use ::err_string
or Err("...".into())
instead.
fn err_string<T, S: Into<String>>(desc: S) -> Result<T>
[src]
Returns a new Err(ocl_core::ErrorKind::String(...))
variant with the
given description.
fn eval_errcode<T, S: Into<String>>(
errcode: i32,
result: T,
fn_name: &'static str,
fn_info: S
) -> Result<T>
[src]
errcode: i32,
result: T,
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 err_conversion<T, S: Into<String>>(desc: S) -> Result<T>
[src]
Returns a new ocl::Result::Err
containing an
ocl::ErrorKind::Conversion
variant with the given description.
fn prepend<'s, S: AsRef<&'s str>>(&'s mut self, txt: S)
[src]
: Use Err("...".into())
instead.
If this is a String
variant, concatenate txt
to the front of the
contained string. Otherwise, do nothing at all.
fn chain<E: Into<Error>>(self, err: E) -> Self
[src]
Creates a new error with this error as its cause.
fn status(&self) -> Option<Status>
[src]
Returns the error status code for Status
variants.
fn kind(&self) -> &ErrorKind
[src]
Returns the error variant and contents.
fn cause(&self) -> Option<&Error>
[src]
Returns the immediate cause of this error (e.g. the next error in the chain).
Trait Implementations
impl From<PlatformInfoResult> for OclError
[src]
fn from(err: PlatformInfoResult) -> OclError
[src]
Performs the conversion.
impl From<DeviceInfoResult> for OclError
[src]
fn from(err: DeviceInfoResult) -> OclError
[src]
Performs the conversion.
impl From<ContextInfoResult> for OclError
[src]
fn from(err: ContextInfoResult) -> OclError
[src]
Performs the conversion.
impl From<GlContextInfoResult> for OclError
[src]
fn from(err: GlContextInfoResult) -> OclError
[src]
Performs the conversion.
impl From<CommandQueueInfoResult> for OclError
[src]
fn from(err: CommandQueueInfoResult) -> OclError
[src]
Performs the conversion.
impl From<MemInfoResult> for OclError
[src]
fn from(err: MemInfoResult) -> OclError
[src]
Performs the conversion.
impl From<ImageInfoResult> for OclError
[src]
fn from(err: ImageInfoResult) -> OclError
[src]
Performs the conversion.
impl From<SamplerInfoResult> for OclError
[src]
fn from(err: SamplerInfoResult) -> OclError
[src]
Performs the conversion.
impl From<ProgramInfoResult> for OclError
[src]
fn from(err: ProgramInfoResult) -> OclError
[src]
Performs the conversion.
impl From<ProgramBuildInfoResult> for OclError
[src]
fn from(err: ProgramBuildInfoResult) -> OclError
[src]
Performs the conversion.
impl From<KernelInfoResult> for OclError
[src]
fn from(err: KernelInfoResult) -> OclError
[src]
Performs the conversion.
impl From<KernelArgInfoResult> for OclError
[src]
fn from(err: KernelArgInfoResult) -> OclError
[src]
Performs the conversion.
impl From<KernelWorkGroupInfoResult> for OclError
[src]
fn from(err: KernelWorkGroupInfoResult) -> OclError
[src]
Performs the conversion.
impl From<EventInfoResult> for OclError
[src]
fn from(err: EventInfoResult) -> OclError
[src]
Performs the conversion.
impl From<ProfilingInfoResult> for OclError
[src]
fn from(err: ProfilingInfoResult) -> OclError
[src]
Performs the conversion.
impl Debug for Error
[src]
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl StdError for Error
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&StdError>
[src]
The lower-level cause of this error, if any. Read more
impl From<()> for Error
[src]
impl From<EmptyInfoResult> for Error
[src]
fn from(err: EmptyInfoResult) -> Self
[src]
Performs the conversion.
impl From<String> for Error
[src]
impl<'a> From<&'a str> for Error
[src]
impl From<NulError> for Error
[src]
impl From<Error> for Error
[src]
impl From<FromUtf8Error> for Error
[src]
fn from(err: FromUtf8Error) -> Self
[src]
Performs the conversion.
impl From<IntoStringError> for Error
[src]
fn from(err: IntoStringError) -> Self
[src]
Performs the conversion.