Trait aterm::ATermFactory [] [src]

pub trait ATermFactory<'s> {
    type ATerm: ATerm<'s, Rec = Self::ATermRef>;
    type ATermRef: Borrow<Self::ATerm>;
    fn int(&'s self, value: i32) -> Self::ATermRef;
fn string<S>(&'s self, value: S) -> Self::ATermRef
    where
        S: Into<Cow<'s, str>>
;
fn tuple<I>(&'s self, children: I) -> Self::ATermRef
    where
        I: IntoIterator<Item = Self::ATermRef>
;
fn real(&'s self, value: f32) -> Self::ATermRef;
fn application<I, S>(
        &'s self,
        constructor: S,
        children: I
    ) -> Self::ATermRef
    where
        I: IntoIterator<Item = Self::ATermRef>,
        S: Into<Cow<'s, str>>
;
fn list<I>(&'s self, value: I) -> Self::ATermRef
    where
        I: IntoIterator<Item = Self::ATermRef>
;
fn placeholder(
        &'s self,
        value: TermPlaceholder<Self::ATermRef>
    ) -> Self::ATermRef;
fn blob(&'s self, value: <Self::ATerm as ATerm<'s>>::Blob) -> Self::ATermRef;
fn long(&'s self, value: i64) -> Self::ATermRef;
fn with_annos<A>(&'s self, term: Self::ATermRef, annos: A) -> Self::ATermRef
    where
        A: IntoIterator<Item = Self::ATermRef>
; }

An all-in-one package for building ATerms. Maybe be pure, or have internal mutability to give you maximally shared ATerms.

Associated Types

The ATerm the factory builds

The reference to an ATerm that's returned. You usually want these to be cheaply cloneable!

Required Methods

The string variant in ATerms is represented as an application with zero children!

The tuple in ATerms is represented as an application with an empty constructor string!

Implementors