[−][src]Enum rustler::error::Error
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
BadArg
Returned when the NIF has been called with the wrong number or type of arguments.
Atom(&'static str)
Encodes the string into an atom and returns it from the NIF.
RaiseAtom(&'static str)
RaiseTerm(Box<dyn Encoder>)
Methods
impl Error
[src]
pub unsafe fn encode<'a>(self, env: Env<'a>) -> Term<'a>
[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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,