[][src]Struct weld::WeldError

pub struct WeldError { /* fields omitted */ }

An error when compiling or running a Weld program.

Methods

impl WeldError
[src]

Creates a new error with a message and error code.

Examples

use weld::{WeldError, WeldRuntimeErrno};

let err = WeldError::new("A new error", WeldRuntimeErrno::Unknown);

Creates a new error with a particular message and an Unknown error code.

Examples

use weld::{WeldError, WeldRuntimeErrno};

let err = WeldError::new_unknown("A new unknown error");
assert_eq!(err.code(), WeldRuntimeErrno::Unknown);

Creates a new error with a particular message indicating success.

The error returned by this function has a message "Success" and the error code WeldRuntimeErrno::Success.

Examples

use weld::{WeldError, WeldRuntimeErrno};

let err = WeldError::new_success();
assert_eq!(err.code(), WeldRuntimeErrno::Success);
assert_eq!(err.message().to_str().unwrap(), "Success");

Returns the error code of this WeldError.

Examples

use weld::{WeldError, WeldRuntimeErrno};

let err = WeldError::new("An out of memory error", WeldRuntimeErrno::OutOfMemory);
assert_eq!(err.code(), WeldRuntimeErrno::OutOfMemory);

Returns the error message of this WeldError.

Examples

use weld::{WeldError, WeldRuntimeErrno};

let err = WeldError::new("Custom error", WeldRuntimeErrno::Unknown);
assert_eq!(err.message().to_str().unwrap(), "Custom error");

Trait Implementations

impl Clone for WeldError
[src]

Performs copy-assignment from source. Read more

impl Default for WeldError
[src]

impl Debug for WeldError
[src]

Auto Trait Implementations

impl Send for WeldError

impl Sync for WeldError

Blanket Implementations

impl<T> From for T
[src]

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

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, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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