erl_nif 0.1.0

Write Erlang and Elixir NIFs in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{Env, Term};

#[derive(Clone, Copy)]
pub struct BitString<'a>(Term<'a>);

impl<'a> BitString<'a> {
	pub(crate) fn from_term(term: Term<'a>) -> BitString<'a> {
		BitString(term)
	}

	pub fn term(&self) -> Term<'a> {
		self.0
	}

	pub fn env(&self) -> Env<'a> {
		self.0.env()
	}
}