Struct rustler::types::atom::NifAtom
[−]
[src]
pub struct NifAtom { /* fields omitted */ }
Methods
impl NifAtom
[src]
fn as_c_arg(&self) -> NIF_TERM
fn to_term<'a>(self, env: NifEnv<'a>) -> NifTerm<'a>
fn from_term(term: NifTerm) -> NifResult<Self>
fn from_bytes<'a>(env: NifEnv<'a>, bytes: &[u8]) -> NifResult<NifAtom>
Return the atom whose text representation is bytes
, like erlang:binary_to_atom/2
.
Errors
NifError::BadArg
if bytes.len() > 255
.
fn from_str<'a>(env: NifEnv<'a>, string: &str) -> NifResult<NifAtom>
Return the atom whose text representation is the given string
, like erlang:list_to_atom/2
.
Errors
NifError::BadArg
if string
contains characters that aren't in Latin-1, or if it's too
long. The maximum length is 255 characters.
Trait Implementations
impl PartialEq for NifAtom
[src]
fn eq(&self, __arg_0: &NifAtom) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &NifAtom) -> bool
This method tests for !=
.
impl Eq for NifAtom
[src]
impl Clone for NifAtom
[src]
fn clone(&self) -> NifAtom
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for NifAtom
[src]
impl Debug for NifAtom
[src]
impl NifEncoder for NifAtom
[src]
impl<'a> NifDecoder<'a> for NifAtom
[src]
impl<'a> PartialEq<NifTerm<'a>> for NifAtom
[src]
fn eq(&self, other: &NifTerm<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.