pub struct TermPool { /* private fields */ }
Expand description
This is the thread local term pool.
Implementations§
Source§impl TermPool
impl TermPool
pub fn new() -> TermPool
Sourcepub fn true_term(&self) -> &DataExpression
pub fn true_term(&self) -> &DataExpression
This does not necessarily belong here, but we need a central storage of default terms.
Sourcepub fn from_string(&mut self, text: &str) -> Result<ATerm, Exception>
pub fn from_string(&mut self, text: &str) -> Result<ATerm, Exception>
Creates an ATerm from a string.
Sourcepub fn create<'a, 'b>(
&mut self,
symbol: &impl Borrow<SymbolRef<'a>>,
arguments: &[impl Borrow<ATermRef<'b>>],
) -> ATerm
pub fn create<'a, 'b>( &mut self, symbol: &impl Borrow<SymbolRef<'a>>, arguments: &[impl Borrow<ATermRef<'b>>], ) -> ATerm
Creates an ATerm with the given symbol and arguments.
Sourcepub fn create_data_application<'a, 'b>(
&mut self,
head: &impl Borrow<ATermRef<'a>>,
arguments: &[impl Borrow<ATermRef<'b>>],
) -> ATerm
pub fn create_data_application<'a, 'b>( &mut self, head: &impl Borrow<ATermRef<'a>>, arguments: &[impl Borrow<ATermRef<'b>>], ) -> ATerm
Creates an ATerm with the given symbol, head argument and other arguments.
Sourcepub fn create_symbol(&mut self, name: &str, arity: usize) -> Symbol
pub fn create_symbol(&mut self, name: &str, arity: usize) -> Symbol
Creates a function symbol with the given name and arity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TermPool
impl RefUnwindSafe for TermPool
impl !Send for TermPool
impl !Sync for TermPool
impl Unpin for TermPool
impl UnwindSafe for TermPool
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