Struct rustler::types::atom::Atom [−][src]
pub struct Atom { /* fields omitted */ }
Methods
impl Atom
[src]
impl Atom
pub fn as_c_arg(&self) -> NIF_TERM
[src]
pub fn as_c_arg(&self) -> NIF_TERM
pub fn to_term<'a>(self, env: Env<'a>) -> Term<'a>
[src]
pub fn to_term<'a>(self, env: Env<'a>) -> Term<'a>
pub fn from_term(term: Term) -> NifResult<Self>
[src]
pub fn from_term(term: Term) -> NifResult<Self>
pub fn from_bytes<'a>(env: Env<'a>, bytes: &[u8]) -> NifResult<Atom>
[src]
pub fn from_bytes<'a>(env: Env<'a>, bytes: &[u8]) -> NifResult<Atom>
Return the atom whose text representation is bytes
, like erlang:binary_to_atom/2
.
Errors
Error::BadArg
if bytes.len() > 255
.
pub fn from_str<'a>(env: Env<'a>, string: &str) -> NifResult<Atom>
[src]
pub fn from_str<'a>(env: Env<'a>, string: &str) -> NifResult<Atom>
Return the atom whose text representation is the given string
, like erlang:list_to_atom/2
.
Errors
Error::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 Atom
[src]
impl PartialEq for Atom
fn eq(&self, other: &Atom) -> bool
[src]
fn eq(&self, other: &Atom) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Atom) -> bool
[src]
fn ne(&self, other: &Atom) -> bool
This method tests for !=
.
impl Eq for Atom
[src]
impl Eq for Atom
impl Clone for Atom
[src]
impl Clone for Atom
fn clone(&self) -> Atom
[src]
fn clone(&self) -> Atom
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Atom
[src]
impl Copy for Atom
impl Debug for Atom
[src]
impl Debug for Atom
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Encoder for Atom
[src]
impl Encoder for Atom
impl<'a> Decoder<'a> for Atom
[src]
impl<'a> Decoder<'a> for Atom
impl<'a> PartialEq<Term<'a>> for Atom
[src]
impl<'a> PartialEq<Term<'a>> for Atom
fn eq(&self, other: &Term<'a>) -> bool
[src]
fn eq(&self, other: &Term<'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[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Sync for Atom
[src]
impl Sync for Atom
impl Send for Atom
[src]
impl Send for Atom