pub struct Term<'a> { /* private fields */ }
Implementations
sourceimpl<'a> Term<'a>
impl<'a> Term<'a>
pub fn from_raw(env: Env<'a>, term: ERL_NIF_TERM) -> Term<'a>
pub fn env(&self) -> Env<'a>
pub fn raw(&self) -> ERL_NIF_TERM
pub fn term_type(&self) -> ErlNifTermType
pub fn is_atom(&self) -> bool
pub fn as_atom(&self) -> Result<Atom<'a>>
pub fn is_binary(&self) -> bool
pub fn as_binary(&self) -> Result<BinaryTerm<'a>>
pub fn is_bitstring(&self) -> bool
pub fn as_bitstring(&self) -> Result<BitString<'a>>
pub fn is_float(&self) -> bool
pub fn as_float(&self) -> Result<Float<'a>>
pub fn is_fun(&self) -> bool
pub fn as_fun(&self) -> Result<Fun<'a>>
pub fn is_integer(&self) -> bool
pub fn as_integer(&self) -> Result<Integer<'a>>
pub fn is_list(&self) -> bool
pub fn as_list(&self) -> Result<List<'a>>
pub fn is_map(&self) -> bool
pub fn as_map(&self) -> Result<Map<'a>>
pub fn is_pid(&self) -> bool
pub fn as_pid(&self) -> Result<Pid<'a>>
pub fn is_port(&self) -> bool
pub fn as_port(&self) -> Result<Port<'a>>
pub fn is_reference(&self) -> bool
pub fn as_resource<T>(
&self,
resource_type: ResourceType<T>
) -> Result<ResourceTerm<'_, T>>
pub fn is_tuple(&self) -> bool
pub fn as_tuple(&self) -> Result<Tuple<'a>>
Trait Implementations
sourceimpl<'a> From<BinaryTerm<'a>> for Term<'a>
impl<'a> From<BinaryTerm<'a>> for Term<'a>
sourcefn from(value: BinaryTerm<'a>) -> Term<'a>
fn from(value: BinaryTerm<'a>) -> Term<'a>
Performs the conversion.
sourceimpl<'a, T: 'a> From<ResourceTerm<'a, T>> for Term<'a>
impl<'a, T: 'a> From<ResourceTerm<'a, T>> for Term<'a>
sourcefn from(value: ResourceTerm<'a, T>) -> Term<'a>
fn from(value: ResourceTerm<'a, T>) -> Term<'a>
Performs the conversion.
sourceimpl<'a> FromErlNif<'a> for Term<'a>
impl<'a> FromErlNif<'a> for Term<'a>
fn from_erl_nif(term: Term<'a>) -> Result<Self>
sourceimpl<'a> IntoErlNif<'a> for Term<'a>
impl<'a> IntoErlNif<'a> for Term<'a>
fn into_erl_nif(self, _env: Env<'a>) -> Result<Term<'a>>
impl<'a> Copy for Term<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Term<'a>
impl<'a> !Send for Term<'a>
impl<'a> !Sync for Term<'a>
impl<'a> Unpin for Term<'a>
impl<'a> UnwindSafe for Term<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more