Enum erlang_port::ErlResult [−][src]
pub enum ErlResult<T, E> { Ok(T), Error(E), }
A result enum for replying to commands from Erlang.
This will serialize into a standard erlang result tuple of either:
{:ok, result}
on Ok{:error err}
on Error
All replies sent via reply
are converted into this enum.
Variants
Ok(T)
Error(E)
Trait Implementations
impl<T: Debug, E: Debug> Debug for ErlResult<T, E>
[src]
impl<T: Debug, E: Debug> Debug for ErlResult<T, E>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: PartialEq, E: PartialEq> PartialEq for ErlResult<T, E>
[src]
impl<T: PartialEq, E: PartialEq> PartialEq for ErlResult<T, E>
fn eq(&self, other: &ErlResult<T, E>) -> bool
[src]
fn eq(&self, other: &ErlResult<T, E>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ErlResult<T, E>) -> bool
[src]
fn ne(&self, other: &ErlResult<T, E>) -> bool
This method tests for !=
.
impl<T, E> From<Result<T, E>> for ErlResult<T, E>
[src]
impl<T, E> From<Result<T, E>> for ErlResult<T, E>