pub struct Atom { /* private fields */ }
Implementations§
source§impl Atom
impl Atom
pub fn as_c_arg(self) -> NIF_TERM
pub fn to_term(self, env: Env<'_>) -> Term<'_>
pub fn from_term(term: Term<'_>) -> NifResult<Self>
sourcepub fn from_bytes(env: Env<'_>, bytes: &[u8]) -> NifResult<Atom>
pub fn from_bytes(env: Env<'_>, 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
.
Trait Implementations§
source§impl<'a> PartialEq<Term<'a>> for Atom
impl<'a> PartialEq<Term<'a>> for Atom
source§impl PartialEq for Atom
impl PartialEq for Atom
impl Copy for Atom
impl Eq for Atom
impl Send for Atom
impl StructuralPartialEq for Atom
impl Sync for Atom
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more