Enum rustler::error::Error[][src]

pub enum Error {
    BadArg,
    Atom(&'static str),
    RaiseAtom(&'static str),
    RaiseTerm(Box<Encoder>),
}

Represents usual errors that can happen in a nif. This enables you to return an error from anywhere, even places where you don't have an Env availible.

Variants

Returned when the NIF has been called with the wrong number or type of arguments.

Encodes the string into an atom and returns it from the NIF.

Methods

impl Error
[src]

Unsafe

If self is a BadArg, RaiseAtom, or RaiseTerm value, then the term returned from this method must not be used except as the return value from the calling NIF.

Auto Trait Implementations

impl !Send for Error

impl !Sync for Error