Trait aterm::ATermFactory [] [src]

pub trait ATermFactory<'a, B: 'a> {
    type ATerm: ATerm<Blob = B, Rec = Self::ATermRef>;
    type ATermRef: Borrow<Self::ATerm>;
    fn no_annos(&'a self, term: Term<Self::ATermRef, B>) -> Self::ATermRef;
    fn with_annos<A>(
        &'a self,
        term: Term<Self::ATermRef, B>,
        annos: A
    ) -> Self::ATermRef
    where
        A: IntoIterator<Item = Self::ATermRef>
; fn int(&'a self, value: i32) -> Self::ATermRef { ... } fn string(&'a self, value: String) -> Self::ATermRef { ... } fn tuple<I>(&'a self, children: I) -> Self::ATermRef
    where
        I: IntoIterator<Item = Self::ATermRef>
, { ... } fn real(&'a self, value: f32) -> Self::ATermRef { ... } fn application<I>(
        &'a self,
        constructor: String,
        children: I
    ) -> Self::ATermRef
    where
        I: IntoIterator<Item = Self::ATermRef>
, { ... } fn list<I>(&'a self, value: I) -> Self::ATermRef
    where
        I: IntoIterator<Item = Self::ATermRef>
, { ... } fn placeholder(
        &'a self,
        value: TermPlaceholder<Self::ATermRef>
    ) -> Self::ATermRef { ... } fn blob(&'a self, value: B) -> Self::ATermRef { ... } fn long(&'a self, value: i64) -> Self::ATermRef { ... } fn t_int(&'a self, value: i32) -> Term<Self::ATermRef, B> { ... } fn t_string(&'a self, value: String) -> Term<Self::ATermRef, B> { ... } fn t_tuple<I>(&'a self, children: I) -> Term<Self::ATermRef, B>
    where
        I: IntoIterator<Item = Self::ATermRef>
, { ... } fn t_real(&'a self, value: f32) -> Term<Self::ATermRef, B> { ... } fn t_application<I>(
        &'a self,
        constructor: String,
        children: I
    ) -> Term<Self::ATermRef, B>
    where
        I: IntoIterator<Item = Self::ATermRef>
, { ... } fn t_list<I>(&'a self, value: I) -> Term<Self::ATermRef, B>
    where
        I: IntoIterator<Item = Self::ATermRef>
, { ... } fn t_placeholder(
        &'a self,
        value: TermPlaceholder<Self::ATermRef>
    ) -> Term<Self::ATermRef, B> { ... } fn t_blob(&'a self, value: B) -> Term<Self::ATermRef, B> { ... } fn t_long(&'a self, value: i64) -> Term<Self::ATermRef, B> { ... } }

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

Associated Types

Required Methods

Provided 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!

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